コード例 #1
0
ファイル: EnvironmentTest.php プロジェクト: apishka/templater
 public function testCompileSourceInlinesSource()
 {
     $twig = new Apishka_Templater_Environment($this->createMock('Apishka_Templater_LoaderInterface'));
     $source = "<? */*foo*/ ?>\r\nbar\n";
     $expected = "/* <? *//* *foo*//*  ?>*/\n/* bar*/\n/* */\n";
     $compiled = $twig->compileSource($source, 'index');
     $this->assertContains($expected, $compiled);
     $this->assertNotContains('/**', $compiled);
 }