18 $this->assertEquals(
'foo', $node->getAttribute(
'name'));
26 $env =
new Twig_Environment($this->getMockBuilder(
'Twig_LoaderInterface')->getMock(), array(
'strict_variables' =>
true));
27 $env1 =
new Twig_Environment($this->getMockBuilder(
'Twig_LoaderInterface')->getMock(), array(
'strict_variables' =>
false));
29 if (PHP_VERSION_ID >= 70000) {
30 $output =
'($context["foo"] ?? $this->getContext($context, "foo"))';
31 } elseif (PHP_VERSION_ID >= 50400) {
32 $output =
'(isset($context["foo"]) ? $context["foo"] : $this->getContext($context, "foo"))';
34 $output =
'$this->getContext($context, "foo")';
40 array($context,
"// line 1\n\$context"),
An exception for terminatinating execution or to throw for unit testing.
Stores the Twig configuration.
getVariableGetter($name, $line=false)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output