@@ -214,7 +214,7 @@ public function testSingleChoice()
214
214
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
215
215
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
216
216
'multiple ' => false ,
217
- 'expanded ' => false ,
217
+ 'widget ' => ' select ' ,
218
218
));
219
219
220
220
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -236,7 +236,7 @@ public function testSingleChoiceWithoutTranslation()
236
236
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
237
237
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
238
238
'multiple ' => false ,
239
- 'expanded ' => false ,
239
+ 'widget ' => ' select ' ,
240
240
'choice_translation_domain ' => false ,
241
241
));
242
242
@@ -259,7 +259,7 @@ public function testSingleChoiceWithPlaceholderWithoutTranslation()
259
259
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
260
260
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
261
261
'multiple ' => false ,
262
- 'expanded ' => false ,
262
+ 'widget ' => ' select ' ,
263
263
'required ' => false ,
264
264
'translation_domain ' => false ,
265
265
'placeholder ' => 'Placeholder&Not&Translated ' ,
@@ -286,7 +286,7 @@ public function testSingleChoiceAttributes()
286
286
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
287
287
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
288
288
'multiple ' => false ,
289
- 'expanded ' => false ,
289
+ 'widget ' => ' select ' ,
290
290
));
291
291
292
292
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -309,7 +309,7 @@ public function testSingleChoiceWithPreferred()
309
309
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
310
310
'preferred_choices ' => array ('&b ' ),
311
311
'multiple ' => false ,
312
- 'expanded ' => false ,
312
+ 'widget ' => ' select ' ,
313
313
));
314
314
315
315
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('separator ' => '-- sep -- ' , 'attr ' => array ('class ' => 'my&class ' )),
@@ -333,7 +333,7 @@ public function testSingleChoiceWithPreferredAndNoSeparator()
333
333
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
334
334
'preferred_choices ' => array ('&b ' ),
335
335
'multiple ' => false ,
336
- 'expanded ' => false ,
336
+ 'widget ' => ' select ' ,
337
337
));
338
338
339
339
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('separator ' => null , 'attr ' => array ('class ' => 'my&class ' )),
@@ -356,7 +356,7 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()
356
356
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
357
357
'preferred_choices ' => array ('&b ' ),
358
358
'multiple ' => false ,
359
- 'expanded ' => false ,
359
+ 'widget ' => ' select ' ,
360
360
));
361
361
362
362
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('separator ' => '' , 'attr ' => array ('class ' => 'my&class ' )),
@@ -380,7 +380,7 @@ public function testChoiceWithOnlyPreferred()
380
380
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
381
381
'preferred_choices ' => array ('&a ' , '&b ' ),
382
382
'multiple ' => false ,
383
- 'expanded ' => false ,
383
+ 'widget ' => ' select ' ,
384
384
));
385
385
386
386
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -397,7 +397,7 @@ public function testSingleChoiceNonRequired()
397
397
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
398
398
'required ' => false ,
399
399
'multiple ' => false ,
400
- 'expanded ' => false ,
400
+ 'widget ' => ' select ' ,
401
401
));
402
402
403
403
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -421,7 +421,7 @@ public function testSingleChoiceNonRequiredNoneSelected()
421
421
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
422
422
'required ' => false ,
423
423
'multiple ' => false ,
424
- 'expanded ' => false ,
424
+ 'widget ' => ' select ' ,
425
425
));
426
426
427
427
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -444,7 +444,7 @@ public function testSingleChoiceNonRequiredWithPlaceholder()
444
444
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
445
445
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
446
446
'multiple ' => false ,
447
- 'expanded ' => false ,
447
+ 'widget ' => ' select ' ,
448
448
'required ' => false ,
449
449
'placeholder ' => 'Select&Anything&Not&Me ' ,
450
450
));
@@ -470,7 +470,7 @@ public function testSingleChoiceRequiredWithPlaceholder()
470
470
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
471
471
'required ' => true ,
472
472
'multiple ' => false ,
473
- 'expanded ' => false ,
473
+ 'widget ' => ' select ' ,
474
474
'placeholder ' => 'Test&Me ' ,
475
475
));
476
476
@@ -495,7 +495,7 @@ public function testSingleChoiceRequiredWithPlaceholderViaView()
495
495
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
496
496
'required ' => true ,
497
497
'multiple ' => false ,
498
- 'expanded ' => false ,
498
+ 'widget ' => ' select ' ,
499
499
));
500
500
501
501
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('placeholder ' => '' , 'attr ' => array ('class ' => 'my&class ' )),
@@ -521,7 +521,7 @@ public function testSingleChoiceGrouped()
521
521
'Group&2 ' => array ('Choice&C ' => '&c ' ),
522
522
),
523
523
'multiple ' => false ,
524
- 'expanded ' => false ,
524
+ 'widget ' => ' select ' ,
525
525
));
526
526
527
527
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -550,7 +550,7 @@ public function testMultipleChoice()
550
550
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
551
551
'required ' => true ,
552
552
'multiple ' => true ,
553
- 'expanded ' => false ,
553
+ 'widget ' => ' select ' ,
554
554
));
555
555
556
556
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -575,7 +575,7 @@ public function testMultipleChoiceAttributes()
575
575
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
576
576
'required ' => true ,
577
577
'multiple ' => true ,
578
- 'expanded ' => false ,
578
+ 'widget ' => ' select ' ,
579
579
));
580
580
581
581
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -598,7 +598,7 @@ public function testMultipleChoiceSkipsPlaceholder()
598
598
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , array ('&a ' ), array (
599
599
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
600
600
'multiple ' => true ,
601
- 'expanded ' => false ,
601
+ 'widget ' => ' select ' ,
602
602
'placeholder ' => 'Test&Me ' ,
603
603
));
604
604
@@ -622,7 +622,7 @@ public function testMultipleChoiceNonRequired()
622
622
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
623
623
'required ' => false ,
624
624
'multiple ' => true ,
625
- 'expanded ' => false ,
625
+ 'widget ' => ' select ' ,
626
626
));
627
627
628
628
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
@@ -643,8 +643,7 @@ public function testSingleChoiceExpanded()
643
643
{
644
644
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
645
645
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
646
- 'multiple ' => false ,
647
- 'expanded ' => true ,
646
+ 'widget ' => 'radio ' ,
648
647
));
649
648
650
649
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
@@ -678,8 +677,7 @@ public function testSingleChoiceExpandedWithoutTranslation()
678
677
{
679
678
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
680
679
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
681
- 'multiple ' => false ,
682
- 'expanded ' => true ,
680
+ 'widget ' => 'radio ' ,
683
681
'choice_translation_domain ' => false ,
684
682
));
685
683
@@ -715,8 +713,7 @@ public function testSingleChoiceExpandedAttributes()
715
713
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
716
714
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
717
715
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
718
- 'multiple ' => false ,
719
- 'expanded ' => true ,
716
+ 'widget ' => 'radio ' ,
720
717
));
721
718
722
719
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
@@ -750,8 +747,7 @@ public function testSingleChoiceExpandedWithPlaceholder()
750
747
{
751
748
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
752
749
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
753
- 'multiple ' => false ,
754
- 'expanded ' => true ,
750
+ 'widget ' => 'radio ' ,
755
751
'placeholder ' => 'Test&Me ' ,
756
752
));
757
753
@@ -795,8 +791,7 @@ public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
795
791
{
796
792
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , array (
797
793
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
798
- 'multiple ' => false ,
799
- 'expanded ' => true ,
794
+ 'widget ' => 'radio ' ,
800
795
'translation_domain ' => false ,
801
796
'placeholder ' => 'Placeholder&Not&Translated ' ,
802
797
));
@@ -841,8 +836,7 @@ public function testSingleChoiceExpandedWithBooleanValue()
841
836
{
842
837
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , true , array (
843
838
'choices ' => array ('Choice&A ' => '1 ' , 'Choice&B ' => '0 ' ),
844
- 'multiple ' => false ,
845
- 'expanded ' => true ,
839
+ 'widget ' => 'radio ' ,
846
840
));
847
841
848
842
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
@@ -876,8 +870,7 @@ public function testMultipleChoiceExpanded()
876
870
{
877
871
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , array ('&a ' , '&c ' ), array (
878
872
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
879
- 'multiple ' => true ,
880
- 'expanded ' => true ,
873
+ 'widget ' => 'checkbox ' ,
881
874
'required ' => true ,
882
875
));
883
876
@@ -921,8 +914,7 @@ public function testMultipleChoiceExpandedWithoutTranslation()
921
914
{
922
915
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , array ('&a ' , '&c ' ), array (
923
916
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
924
- 'multiple ' => true ,
925
- 'expanded ' => true ,
917
+ 'widget ' => 'checkbox ' ,
926
918
'required ' => true ,
927
919
'choice_translation_domain ' => false ,
928
920
));
@@ -968,8 +960,7 @@ public function testMultipleChoiceExpandedAttributes()
968
960
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , array ('&a ' , '&c ' ), array (
969
961
'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
970
962
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
971
- 'multiple ' => true ,
972
- 'expanded ' => true ,
963
+ 'widget ' => 'checkbox ' ,
973
964
'required ' => true ,
974
965
));
975
966
0 commit comments