Skip to content

Commit

Permalink
fix missing filename in exception
Browse files Browse the repository at this point in the history
  • Loading branch information
havvg committed Sep 16, 2013
1 parent 60021fe commit fd1698d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Imagine/Data/Loader/FileSystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function find($path)
if (!empty($targetFormat) && is_file($name)) {
$absolutePath = $name;
} else {
throw new NotFoundHttpException(sprintf('Source image not found in "%s"', $absolutePath));
throw new NotFoundHttpException(sprintf('Source image not found in "%s"', $file));
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Tests/Imagine/Data/Loader/FileSystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function testFindNotExisting()

$loader = new FileSystemLoader($this->imagine, array('jpeg'), $this->tempDir);

$this->setExpectedException('Symfony\Component\HttpKernel\Exception\NotFoundHttpException');
$file = realpath($this->tempDir).'/invalid.jpeg';
$this->setExpectedException('Symfony\Component\HttpKernel\Exception\NotFoundHttpException', 'Source image not found in "'.$file.'"');

$loader->find('/invalid.jpeg');
}
Expand Down

0 comments on commit fd1698d

Please sign in to comment.