public function getCompiler() { if (null === $this->compiler) { $this->compiler = new Twig_Compiler($this); } return $this->compiler; }
public function testCompileClassConstant() { $expression = new StaticConstantExpression('\\StaticConstantExpressionTest::SOME_VALUE', 1); $this->assertEquals('\\StaticConstantExpressionTest::SOME_VALUE', $this->environment->getCompiler()->compile($expression)->getSource()); }