fixed macros when using an argument named like a PHP super globa

This commit is contained in:
Fabien Potencier
2014-10-11 22:38:36 +02:00
parent d12f7afbbe
commit b5f074207d
3 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -46,11 +46,11 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
return array(
array($node, <<<EOF
// line 1
public function getfoo(\$_foo = null, \$_bar = "Foo")
public function getfoo(\$__foo__ = null, \$__bar__ = "Foo")
{
\$context = \$this->env->mergeGlobals(array(
"foo" => \$_foo,
"bar" => \$_bar,
"foo" => \$__foo__,
"bar" => \$__bar__,
));
\$blocks = array();