public function Twig_Tests_EnvironmentTest::testCompileSourceInlinesSource in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php \Twig_Tests_EnvironmentTest::testCompileSourceInlinesSource()
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ EnvironmentTest.php, line 141
Class
Code
public function testCompileSourceInlinesSource() {
$twig = new Twig_Environment($this
->getMock('Twig_LoaderInterface'));
$source = "<? */*foo*/ ?>\r\nbar\n";
$expected = "/* <? *//* *foo*//* ?>*/\n/* bar*/\n/* */\n";
$compiled = $twig
->compileSource($source, 'index');
$this
->assertContains($expected, $compiled);
$this
->assertNotContains('/**', $compiled);
}