Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / twig / twig / lib / Twig / Test / IntegrationTestCase.php
index 899c3aaf97e3ff16e005243525f503fc0d963676..382a3f2a205de5f5e95d08c86218d5874d6708f1 100644 (file)
@@ -24,6 +24,14 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase
      */
     abstract protected function getFixturesDir();
 
+    /**
+     * @return Twig_RuntimeLoaderInterface[]
+     */
+    protected function getRuntimeLoaders()
+    {
+        return array();
+    }
+
     /**
      * @return Twig_ExtensionInterface[]
      */
@@ -124,7 +132,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase
     protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs)
     {
         if (!$outputs) {
-            $this->markTestSkipped('no legacy tests to run');
+            $this->markTestSkipped('no tests to run');
         }
 
         if ($condition) {
@@ -143,6 +151,10 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase
             ), $match[2] ? eval($match[2].';') : array());
             $twig = new Twig_Environment($loader, $config);
             $twig->addGlobal('global', 'global');
+            foreach ($this->getRuntimeLoaders() as $runtimeLoader) {
+                $twig->addRuntimeLoader($runtimeLoader);
+            }
+
             foreach ($this->getExtensions() as $extension) {
                 $twig->addExtension($extension);
             }