Esempio n. 1
0
 protected function getPHP($template, $renderingType)
 {
     $serializer = new Serializer();
     $optimizer = new Optimizer();
     $ir = TemplateParser::parse($template, $renderingType);
     $php = $serializer->serialize($ir->documentElement);
     $php = $optimizer->optimize($php);
     return $php;
 }
Esempio n. 2
0
 /**
  * @dataProvider getOptimizationTests
  * @testdox optimize() tests
  */
 public function testOptimizations($original, $expected)
 {
     $optimizer = new Optimizer();
     $this->assertSame($expected, $optimizer->optimize($original));
 }