Skip to content

Commit

Permalink
Merge pull request #759 from hydephp/update-FileNotFoundException
Browse files Browse the repository at this point in the history
Wrap the file path in brackets for the FileNotFoundException
  • Loading branch information
caendesilva authored Dec 15, 2022
2 parents ed57dac + ad30de7 commit 44d9e14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FileNotFoundException extends Exception

public function __construct(?string $path = null, ?string $message = null)
{
$this->message = $message ?? ($path ? "File $path not found." : $this->message);
$this->message = $message ?? ($path ? "File [$path] not found." : $this->message);

parent::__construct($this->message, $this->code);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testCanCompileBladeFileWithData()
public function testWithMissingView()
{
$this->expectException(FileNotFoundException::class);
$this->expectExceptionMessage('File foo.blade.php not found.');
$this->expectExceptionMessage('File [foo.blade.php] not found.');

AnonymousViewCompiler::call('foo.blade.php');
}
Expand Down

0 comments on commit 44d9e14

Please sign in to comment.