2121use Twig \Node \Expression \ConditionalExpression ;
2222use Twig \Node \Expression \ConstantExpression ;
2323use Twig \Node \Expression \NameExpression ;
24+ use Twig \Node \Expression \Variable \ContextVariable ;
2425use Twig \Node \Node ;
2526use Twig \Node \Nodes ;
2627use Twig \TwigFunction ;
@@ -31,7 +32,7 @@ public function testCompileWidget()
3132 {
3233 if (class_exists (Nodes::class)) {
3334 $ arguments = new Nodes ([
34- new NameExpression ('form ' , 0 ),
35+ new ContextVariable ('form ' , 0 ),
3536 ]);
3637 } else {
3738 $ arguments = new Node ([
@@ -56,7 +57,7 @@ public function testCompileWidgetWithVariables()
5657 {
5758 if (class_exists (Nodes::class)) {
5859 $ arguments = new Nodes ([
59- new NameExpression ('form ' , 0 ),
60+ new ContextVariable ('form ' , 0 ),
6061 new ArrayExpression ([
6162 new ConstantExpression ('foo ' , 0 ),
6263 new ConstantExpression ('bar ' , 0 ),
@@ -89,7 +90,7 @@ public function testCompileLabelWithLabel()
8990 {
9091 if (class_exists (Nodes::class)) {
9192 $ arguments = new Nodes ([
92- new NameExpression ('form ' , 0 ),
93+ new ContextVariable ('form ' , 0 ),
9394 new ConstantExpression ('my label ' , 0 ),
9495 ]);
9596 } else {
@@ -116,7 +117,7 @@ public function testCompileLabelWithNullLabel()
116117 {
117118 if (class_exists (Nodes::class)) {
118119 $ arguments = new Nodes ([
119- new NameExpression ('form ' , 0 ),
120+ new ContextVariable ('form ' , 0 ),
120121 new ConstantExpression (null , 0 ),
121122 ]);
122123 } else {
@@ -145,7 +146,7 @@ public function testCompileLabelWithEmptyStringLabel()
145146 {
146147 if (class_exists (Nodes::class)) {
147148 $ arguments = new Nodes ([
148- new NameExpression ('form ' , 0 ),
149+ new ContextVariable ('form ' , 0 ),
149150 new ConstantExpression ('' , 0 ),
150151 ]);
151152 } else {
@@ -174,7 +175,7 @@ public function testCompileLabelWithDefaultLabel()
174175 {
175176 if (class_exists (Nodes::class)) {
176177 $ arguments = new Nodes ([
177- new NameExpression ('form ' , 0 ),
178+ new ContextVariable ('form ' , 0 ),
178179 ]);
179180 } else {
180181 $ arguments = new Node ([
@@ -199,7 +200,7 @@ public function testCompileLabelWithAttributes()
199200 {
200201 if (class_exists (Nodes::class)) {
201202 $ arguments = new Nodes ([
202- new NameExpression ('form ' , 0 ),
203+ new ContextVariable ('form ' , 0 ),
203204 new ConstantExpression (null , 0 ),
204205 new ArrayExpression ([
205206 new ConstantExpression ('foo ' , 0 ),
@@ -237,7 +238,7 @@ public function testCompileLabelWithLabelAndAttributes()
237238 {
238239 if (class_exists (Nodes::class)) {
239240 $ arguments = new Nodes ([
240- new NameExpression ('form ' , 0 ),
241+ new ContextVariable ('form ' , 0 ),
241242 new ConstantExpression ('value in argument ' , 0 ),
242243 new ArrayExpression ([
243244 new ConstantExpression ('foo ' , 0 ),
@@ -276,7 +277,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNull()
276277 {
277278 if (class_exists (Nodes::class)) {
278279 $ arguments = new Nodes ([
279- new NameExpression ('form ' , 0 ),
280+ new ContextVariable ('form ' , 0 ),
280281 new ConditionalExpression (
281282 // if
282283 new ConstantExpression (true , 0 ),
@@ -323,7 +324,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
323324 {
324325 if (class_exists (Nodes::class)) {
325326 $ arguments = new Nodes ([
326- new NameExpression ('form ' , 0 ),
327+ new ContextVariable ('form ' , 0 ),
327328 new ConditionalExpression (
328329 // if
329330 new ConstantExpression (true , 0 ),
0 commit comments