made error messages in tests more explicit about where the error occurred
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 1 Jun 2010 12:24:56 +0000 (14:24 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 1 Jun 2010 12:24:56 +0000 (14:24 +0200)
test/Twig/Tests/integrationTest.php

index 3c7d854..091c9e5 100644 (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);