You are here

public function Twig_Tests_EnvironmentTest::testCompileSourceInlinesSource in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php \Twig_Tests_EnvironmentTest::testCompileSourceInlinesSource()

File

vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php, line 141

Class

Twig_Tests_EnvironmentTest

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);
}