Skip to content

Commit

Permalink
[TwigBridge] Accomodate for changes in Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 20, 2023
1 parent e5b1744 commit 832461a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/Node/FormThemeTest.php
Expand Up @@ -47,9 +47,9 @@ public function testCompile()
{
$form = new NameExpression('form', 0);
$resources = new ArrayExpression([
new ConstantExpression(0, 0),
new ConstantExpression('tpl1', 0),
new ConstantExpression(1, 0),
new ConstantExpression('tpl1', 0),
new ConstantExpression(0, 0),
new ConstantExpression('tpl2', 0),
], 0);

Expand All @@ -62,7 +62,7 @@ public function testCompile()

$this->assertEquals(
sprintf(
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], true);',
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [1 => "tpl1", 0 => "tpl2"], true);',
$this->getVariableGetter('form')
),
trim($compiler->compile($node)->getSource())
Expand All @@ -72,7 +72,7 @@ public function testCompile()

$this->assertEquals(
sprintf(
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], false);',
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [1 => "tpl1", 0 => "tpl2"], false);',
$this->getVariableGetter('form')
),
trim($compiler->compile($node)->getSource())
Expand Down

0 comments on commit 832461a

Please sign in to comment.