Security update for Core, with self-updated composer
[yaffs-website] / vendor / twig / twig / lib / Twig / Test / IntegrationTestCase.php
index 899c3aaf97e3ff16e005243525f503fc0d963676..016951aa61147c741742e35b6c7c1582e9f78192 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[]
      */
@@ -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);
             }