mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 02:16:41 +00:00
Fix tests
This commit is contained in:
+1
-1
@@ -845,7 +845,7 @@ class Environment
|
||||
\PHP_MINOR_VERSION,
|
||||
self::VERSION,
|
||||
(int) $this->debug,
|
||||
(int) $this->strictVariables
|
||||
(int) $this->strictVariables,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,6 @@ class CaptureNode extends Node
|
||||
if (!$this->getAttribute('raw')) {
|
||||
$compiler->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())");
|
||||
}
|
||||
$compiler->raw(";");
|
||||
$compiler->raw(';');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user