Fix tests

This commit is contained in:
Fabien Potencier
2024-09-03 13:58:52 +02:00
parent cc1045e4e4
commit 50f8b13adf
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ EOF
public function block_foo(array \$context, array \$blocks = []): iterable
{
\$macros = \$this->macros;
return; yield '';
yield from [];
}
EOF
, new Environment(new ArrayLoader()),
+2 -2
View File
@@ -79,10 +79,10 @@ public function macro_foo(\$__foo__ = null, \$__bar__ = "Foo", ...\$__varargs__)
\$blocks = [];
return ('' === \$tmp = \\Twig\\Extension\\CoreExtension::captureOutput((function () use (&\$context, \$macros, \$blocks) {
return ('' === \$tmp = implode('', iterator_to_array((function () use (&\$context, \$macros, \$blocks) {
yield "foo";
yield from [];
})())) ? '' : new Markup(\$tmp, \$this->env->getCharset());
})()))) ? '' : new Markup(\$tmp, \$this->env->getCharset());
}
EOF
, new Environment(new ArrayLoader(), ['use_yield' => false]),