Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 5, 2024
1 parent b98720f commit 713a5b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ private function updateOptionsHash(): void
\PHP_MINOR_VERSION,
self::VERSION,
(int) $this->debug,
(int) $this->strictVariables
(int) $this->strictVariables,
]);
}
}
2 changes: 1 addition & 1 deletion src/Node/CaptureNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public function compile(Compiler $compiler): void
if (!$this->getAttribute('raw')) {
$compiler->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())");
}
$compiler->raw(";");
$compiler->raw(';');
}
}
8 changes: 4 additions & 4 deletions tests/Node/BlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ 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 = [])
{
\$macros = \$this->macros;
yield '';
}
EOF
, new Environment(new ArrayLoader())
, new Environment(new ArrayLoader()),
];

return $tests;
Expand Down
1 change: 0 additions & 1 deletion tests/Node/SetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function getTests()
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);
Expand Down

0 comments on commit 713a5b9

Please sign in to comment.