public function Twig_Tests_Loader_FilesystemTest::testFindTemplateExceptionNamespace in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php \Twig_Tests_Loader_FilesystemTest::testFindTemplateExceptionNamespace()
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ Loader/ FilesystemTest.php, line 104
Class
Code
public function testFindTemplateExceptionNamespace() {
$basePath = dirname(__FILE__) . '/Fixtures';
$loader = new Twig_Loader_Filesystem(array(
$basePath . '/normal',
));
$loader
->addPath($basePath . '/named', 'named');
try {
$loader
->getSource('@named/nowhere.html');
} catch (Exception $e) {
$this
->assertInstanceof('Twig_Error_Loader', $e);
$this
->assertContains('Unable to find template "@named/nowhere.html"', $e
->getMessage());
}
}