*/
abstract protected function getFixturesDir();
+ /**
+ * @return Twig_RuntimeLoaderInterface[]
+ */
+ protected function getRuntimeLoaders()
+ {
+ return array();
+ }
+
/**
* @return Twig_ExtensionInterface[]
*/
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) {
), $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);
}