Fix tests

This commit is contained in:
Fabien Potencier
2024-02-05 15:43:59 +01:00
parent c129040d46
commit 3daafdae98
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -845,7 +845,7 @@ class Environment
\PHP_MINOR_VERSION,
self::VERSION,
(int) $this->debug,
(int) $this->strictVariables
(int) $this->strictVariables,
]);
}
}
+1 -1
View File
@@ -46,6 +46,6 @@ class CaptureNode extends Node
if (!$this->getAttribute('raw')) {
$compiler->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())");
}
$compiler->raw(";");
$compiler->raw(';');
}
}
+4 -4
View File
@@ -40,10 +40,10 @@ public function block_foo(\$context, array \$blocks = [])
yield "foo";
}
EOF
, new Environment(new ArrayLoader())
];
, new Environment(new ArrayLoader()),
];
$tests[] = [new BlockNode('foo', new Node(), 1), <<<EOF
$tests[] = [new BlockNode('foo', new Node(), 1), <<<EOF
// line 1
public function block_foo(\$context, array \$blocks = [])
{
@@ -51,7 +51,7 @@ public function block_foo(\$context, array \$blocks = [])
yield '';
}
EOF
, new Environment(new ArrayLoader())
, new Environment(new ArrayLoader()),
];
return $tests;
-1
View File
@@ -48,7 +48,6 @@ class SetTest extends NodeTestCase
EOF
];
$names = new Node([new AssignNameExpression('foo', 1)], [], 1);
$values = new Node([new PrintNode(new ConstantExpression('foo', 1), 1)], [], 1);
$node = new SetNode(true, $names, $values, 1);