made error messages in tests more explicit about where the error occurred

This commit is contained in:
Fabien Potencier
2010-06-01 14:24:56 +02:00
parent 21e5397f3b
commit bf31f2f7e0
+2
View File
@@ -49,6 +49,8 @@ class Twig_Tests_IntegrationTest extends PHPUnit_Framework_TestCase
$e->setFilename(str_replace(self::$fixturesDir.'/', '', $file));
throw $e;
} catch (Exception $e) {
throw new Twig_Error($e->getMessage().' (in '.str_replace(self::$fixturesDir, '', $file).')');
}
preg_match_all('/--DATA--(.*?)--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $matches, PREG_SET_ORDER);