2222use Twig \Node \Expression \ConditionalExpression ;
2323use Twig \Node \Expression \ConstantExpression ;
2424use Twig \Node \Expression \NameExpression ;
25+ use Twig \Node \Expression \Variable \ContextVariable ;
2526use Twig \Node \Node ;
2627use Twig \Node \Nodes ;
2728use Twig \TwigFunction ;
@@ -32,7 +33,7 @@ public function testCompileWidget()
3233 {
3334 if (class_exists (Nodes::class)) {
3435 $ arguments = new Nodes ([
35- new NameExpression ('form ' , 0 ),
36+ new ContextVariable ('form ' , 0 ),
3637 ]);
3738 } else {
3839 $ arguments = new Node ([
@@ -61,7 +62,7 @@ public function testCompileWidgetWithVariables()
6162 {
6263 if (class_exists (Nodes::class)) {
6364 $ arguments = new Nodes ([
64- new NameExpression ('form ' , 0 ),
65+ new ContextVariable ('form ' , 0 ),
6566 new ArrayExpression ([
6667 new ConstantExpression ('foo ' , 0 ),
6768 new ConstantExpression ('bar ' , 0 ),
@@ -98,7 +99,7 @@ public function testCompileLabelWithLabel()
9899 {
99100 if (class_exists (Nodes::class)) {
100101 $ arguments = new Nodes ([
101- new NameExpression ('form ' , 0 ),
102+ new ContextVariable ('form ' , 0 ),
102103 new ConstantExpression ('my label ' , 0 ),
103104 ]);
104105 } else {
@@ -129,7 +130,7 @@ public function testCompileLabelWithNullLabel()
129130 {
130131 if (class_exists (Nodes::class)) {
131132 $ arguments = new Nodes ([
132- new NameExpression ('form ' , 0 ),
133+ new ContextVariable ('form ' , 0 ),
133134 new ConstantExpression (null , 0 ),
134135 ]);
135136 } else {
@@ -162,7 +163,7 @@ public function testCompileLabelWithEmptyStringLabel()
162163 {
163164 if (class_exists (Nodes::class)) {
164165 $ arguments = new Nodes ([
165- new NameExpression ('form ' , 0 ),
166+ new ContextVariable ('form ' , 0 ),
166167 new ConstantExpression ('' , 0 ),
167168 ]);
168169 } else {
@@ -195,7 +196,7 @@ public function testCompileLabelWithDefaultLabel()
195196 {
196197 if (class_exists (Nodes::class)) {
197198 $ arguments = new Nodes ([
198- new NameExpression ('form ' , 0 ),
199+ new ContextVariable ('form ' , 0 ),
199200 ]);
200201 } else {
201202 $ arguments = new Node ([
@@ -224,7 +225,7 @@ public function testCompileLabelWithAttributes()
224225 {
225226 if (class_exists (Nodes::class)) {
226227 $ arguments = new Nodes ([
227- new NameExpression ('form ' , 0 ),
228+ new ContextVariable ('form ' , 0 ),
228229 new ConstantExpression (null , 0 ),
229230 new ArrayExpression ([
230231 new ConstantExpression ('foo ' , 0 ),
@@ -266,7 +267,7 @@ public function testCompileLabelWithLabelAndAttributes()
266267 {
267268 if (class_exists (Nodes::class)) {
268269 $ arguments = new Nodes ([
269- new NameExpression ('form ' , 0 ),
270+ new ContextVariable ('form ' , 0 ),
270271 new ConstantExpression ('value in argument ' , 0 ),
271272 new ArrayExpression ([
272273 new ConstantExpression ('foo ' , 0 ),
@@ -309,7 +310,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNull()
309310 {
310311 if (class_exists (Nodes::class)) {
311312 $ arguments = new Nodes ([
312- new NameExpression ('form ' , 0 ),
313+ new ContextVariable ('form ' , 0 ),
313314 new ConditionalExpression (
314315 // if
315316 new ConstantExpression (true , 0 ),
@@ -360,7 +361,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
360361 {
361362 if (class_exists (Nodes::class)) {
362363 $ arguments = new Nodes ([
363- new NameExpression ('form ' , 0 ),
364+ new ContextVariable ('form ' , 0 ),
364365 new ConditionalExpression (
365366 // if
366367 new ConstantExpression (true , 0 ),
0 commit comments