@@ -58,7 +58,7 @@ public function testCompileWidgetWithVariables()
5858
5959 $ this ->assertEquals (
6060 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"] ) ' ,
6262 $ this ->getVariableGetter ('form ' )
6363 ),
6464 trim ($ compiler ->compile ($ node )->getSource ())
@@ -78,7 +78,7 @@ public function testCompileLabelWithLabel()
7878
7979 $ this ->assertEquals (
8080 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"] ) ' ,
8282 $ this ->getVariableGetter ('form ' )
8383 ),
8484 trim ($ compiler ->compile ($ node )->getSource ())
@@ -168,7 +168,7 @@ public function testCompileLabelWithAttributes()
168168 // https://github.com/symfony/symfony/issues/5029
169169 $ this ->assertEquals (
170170 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"] ) ' ,
172172 $ this ->getVariableGetter ('form ' )
173173 ),
174174 trim ($ compiler ->compile ($ node )->getSource ())
@@ -194,7 +194,7 @@ public function testCompileLabelWithLabelAndAttributes()
194194
195195 $ this ->assertEquals (
196196 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"] ) ' ,
198198 $ this ->getVariableGetter ('form ' )
199199 ),
200200 trim ($ compiler ->compile ($ node )->getSource ())
@@ -225,7 +225,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNull()
225225 // https://github.com/symfony/symfony/issues/5029
226226 $ this ->assertEquals (
227227 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_] )) ' ,
229229 $ this ->getVariableGetter ('form ' )
230230 ),
231231 trim ($ compiler ->compile ($ node )->getSource ())
@@ -262,7 +262,7 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
262262 // https://github.com/symfony/symfony/issues/5029
263263 $ this ->assertEquals (
264264 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_] )) ' ,
266266 $ this ->getVariableGetter ('form ' )
267267 ),
268268 trim ($ compiler ->compile ($ node )->getSource ())
0 commit comments