Skip to content

Commit

Permalink
Merge pull request #518 from greg0ire/fix-build
Browse files Browse the repository at this point in the history
Compile nodes before comparing them
  • Loading branch information
goetas authored Feb 6, 2020
2 parents fa53c65 + 72760e0 commit 0f8dec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Twig/BaseTwigTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ final protected function parse($file, $debug = false)
$env->addExtension(new SymfonyTranslationExtension($translator = new IdentityTranslator(new MessageSelector())));
$env->addExtension(new TranslationExtension($translator, $debug));

return $env->parse($env->tokenize(new \Twig_Source($content, null)))->getNode('body');
return $env->compile($env->parse($env->tokenize(new \Twig_Source($content, 'whatever')))->getNode('body'));
}
}

0 comments on commit 0f8dec9

Please sign in to comment.