@@ -58,7 +58,7 @@ public function testCompileWidgetWithVariables()
58
58
59
59
$ this ->assertEquals (
60
60
sprintf (
61
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'widget \', array( "foo" => "bar") ) ' ,
61
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'widget \', [ "foo" => "bar"] ) ' ,
62
62
$ this ->getVariableGetter ('form ' )
63
63
),
64
64
trim ($ compiler ->compile ($ node )->getSource ())
@@ -78,7 +78,7 @@ public function testCompileLabelWithLabel()
78
78
79
79
$ this ->assertEquals (
80
80
sprintf (
81
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', array( "label" => "my label") ) ' ,
81
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', [ "label" => "my label"] ) ' ,
82
82
$ this ->getVariableGetter ('form ' )
83
83
),
84
84
trim ($ compiler ->compile ($ node )->getSource ())
@@ -168,7 +168,7 @@ public function testCompileLabelWithAttributes()
168
168
// https://github.com/symfony/symfony/issues/5029
169
169
$ this ->assertEquals (
170
170
sprintf (
171
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', array( "foo" => "bar") ) ' ,
171
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', [ "foo" => "bar"] ) ' ,
172
172
$ this ->getVariableGetter ('form ' )
173
173
),
174
174
trim ($ compiler ->compile ($ node )->getSource ())
@@ -194,7 +194,7 @@ public function testCompileLabelWithLabelAndAttributes()
194
194
195
195
$ this ->assertEquals (
196
196
sprintf (
197
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', array( "foo" => "bar", "label" => "value in argument") ) ' ,
197
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', [ "foo" => "bar", "label" => "value in argument"] ) ' ,
198
198
$ this ->getVariableGetter ('form ' )
199
199
),
200
200
trim ($ compiler ->compile ($ node )->getSource ())
@@ -225,7 +225,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNull()
225
225
// https://github.com/symfony/symfony/issues/5029
226
226
$ this ->assertEquals (
227
227
sprintf (
228
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? array() : array( "label" => $_label_) )) ' ,
228
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? [] : [ "label" => $_label_] )) ' ,
229
229
$ this ->getVariableGetter ('form ' )
230
230
),
231
231
trim ($ compiler ->compile ($ node )->getSource ())
@@ -262,7 +262,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
262
262
// https://github.com/symfony/symfony/issues/5029
263
263
$ this ->assertEquals (
264
264
sprintf (
265
- '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', array( "foo" => "bar", "label" => "value in attributes") + (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? array() : array( "label" => $_label_) )) ' ,
265
+ '$this->env->getRuntime( \'Symfony\Component\Form\FormRenderer \')->searchAndRenderBlock(%s, \'label \', [ "foo" => "bar", "label" => "value in attributes"] + (twig_test_empty($_label_ = ((true) ? (null) : (null))) ? [] : [ "label" => $_label_] )) ' ,
266
266
$ this ->getVariableGetter ('form ' )
267
267
),
268
268
trim ($ compiler ->compile ($ node )->getSource ())
0 commit comments