@@ -212,7 +212,8 @@ public function testCheckboxWithValue()
212
212
public function testSingleChoice ()
213
213
{
214
214
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
215
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
215
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
216
+ 'choices_as_values ' => true ,
216
217
'multiple ' => false ,
217
218
'expanded ' => false ,
218
219
));
@@ -234,7 +235,8 @@ public function testSingleChoice()
234
235
public function testSingleChoiceWithoutTranslation ()
235
236
{
236
237
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
237
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
238
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
239
+ 'choices_as_values ' => true ,
238
240
'multiple ' => false ,
239
241
'expanded ' => false ,
240
242
'choice_translation_domain ' => false ,
@@ -257,7 +259,8 @@ public function testSingleChoiceWithoutTranslation()
257
259
public function testSingleChoiceAttributes ()
258
260
{
259
261
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
260
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
262
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
263
+ 'choices_as_values ' => true ,
261
264
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
262
265
'multiple ' => false ,
263
266
'expanded ' => false ,
@@ -282,7 +285,8 @@ public function testSingleChoiceAttributes()
282
285
public function testSingleChoiceWithPreferred ()
283
286
{
284
287
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
285
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
288
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
289
+ 'choices_as_values ' => true ,
286
290
'preferred_choices ' => array ('&b ' ),
287
291
'multiple ' => false ,
288
292
'expanded ' => false ,
@@ -306,7 +310,8 @@ public function testSingleChoiceWithPreferred()
306
310
public function testSingleChoiceWithPreferredAndNoSeparator ()
307
311
{
308
312
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
309
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
313
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
314
+ 'choices_as_values ' => true ,
310
315
'preferred_choices ' => array ('&b ' ),
311
316
'multiple ' => false ,
312
317
'expanded ' => false ,
@@ -329,7 +334,8 @@ public function testSingleChoiceWithPreferredAndNoSeparator()
329
334
public function testSingleChoiceWithPreferredAndBlankSeparator ()
330
335
{
331
336
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
332
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
337
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
338
+ 'choices_as_values ' => true ,
333
339
'preferred_choices ' => array ('&b ' ),
334
340
'multiple ' => false ,
335
341
'expanded ' => false ,
@@ -353,7 +359,8 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()
353
359
public function testChoiceWithOnlyPreferred ()
354
360
{
355
361
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
356
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
362
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
363
+ 'choices_as_values ' => true ,
357
364
'preferred_choices ' => array ('&a ' , '&b ' ),
358
365
'multiple ' => false ,
359
366
'expanded ' => false ,
@@ -370,7 +377,8 @@ public function testChoiceWithOnlyPreferred()
370
377
public function testSingleChoiceNonRequired ()
371
378
{
372
379
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
373
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
380
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
381
+ 'choices_as_values ' => true ,
374
382
'required ' => false ,
375
383
'multiple ' => false ,
376
384
'expanded ' => false ,
@@ -394,7 +402,8 @@ public function testSingleChoiceNonRequired()
394
402
public function testSingleChoiceNonRequiredNoneSelected ()
395
403
{
396
404
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , null , array (
397
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
405
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
406
+ 'choices_as_values ' => true ,
398
407
'required ' => false ,
399
408
'multiple ' => false ,
400
409
'expanded ' => false ,
@@ -418,7 +427,8 @@ public function testSingleChoiceNonRequiredNoneSelected()
418
427
public function testSingleChoiceNonRequiredWithPlaceholder ()
419
428
{
420
429
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
421
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
430
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
431
+ 'choices_as_values ' => true ,
422
432
'multiple ' => false ,
423
433
'expanded ' => false ,
424
434
'required ' => false ,
@@ -443,7 +453,8 @@ public function testSingleChoiceNonRequiredWithPlaceholder()
443
453
public function testSingleChoiceRequiredWithPlaceholder ()
444
454
{
445
455
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
446
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
456
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
457
+ 'choices_as_values ' => true ,
447
458
'required ' => true ,
448
459
'multiple ' => false ,
449
460
'expanded ' => false ,
@@ -468,7 +479,8 @@ public function testSingleChoiceRequiredWithPlaceholder()
468
479
public function testSingleChoiceRequiredWithPlaceholderViaView ()
469
480
{
470
481
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
471
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
482
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
483
+ 'choices_as_values ' => true ,
472
484
'required ' => true ,
473
485
'multiple ' => false ,
474
486
'expanded ' => false ,
@@ -493,9 +505,10 @@ public function testSingleChoiceGrouped()
493
505
{
494
506
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
495
507
'choices ' => array (
496
- 'Group&1 ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
497
- 'Group&2 ' => array ('&c ' => 'Choice&C ' ),
508
+ 'Group&1 ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
509
+ 'Group&2 ' => array ('Choice&C ' => '&c ' ),
498
510
),
511
+ 'choices_as_values ' => true ,
499
512
'multiple ' => false ,
500
513
'expanded ' => false ,
501
514
));
@@ -523,7 +536,8 @@ public function testSingleChoiceGrouped()
523
536
public function testMultipleChoice ()
524
537
{
525
538
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' ), array (
526
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
539
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
540
+ 'choices_as_values ' => true ,
527
541
'required ' => true ,
528
542
'multiple ' => true ,
529
543
'expanded ' => false ,
@@ -547,7 +561,8 @@ public function testMultipleChoice()
547
561
public function testMultipleChoiceAttributes ()
548
562
{
549
563
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' ), array (
550
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
564
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
565
+ 'choices_as_values ' => true ,
551
566
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
552
567
'required ' => true ,
553
568
'multiple ' => true ,
@@ -574,7 +589,8 @@ public function testMultipleChoiceAttributes()
574
589
public function testMultipleChoiceSkipsPlaceholder ()
575
590
{
576
591
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' ), array (
577
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
592
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
593
+ 'choices_as_values ' => true ,
578
594
'multiple ' => true ,
579
595
'expanded ' => false ,
580
596
'placeholder ' => 'Test&Me ' ,
@@ -597,7 +613,8 @@ public function testMultipleChoiceSkipsPlaceholder()
597
613
public function testMultipleChoiceNonRequired ()
598
614
{
599
615
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' ), array (
600
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
616
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
617
+ 'choices_as_values ' => true ,
601
618
'required ' => false ,
602
619
'multiple ' => true ,
603
620
'expanded ' => false ,
@@ -620,7 +637,8 @@ public function testMultipleChoiceNonRequired()
620
637
public function testSingleChoiceExpanded ()
621
638
{
622
639
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
623
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
640
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
641
+ 'choices_as_values ' => true ,
624
642
'multiple ' => false ,
625
643
'expanded ' => true ,
626
644
));
@@ -655,7 +673,8 @@ public function testSingleChoiceExpanded()
655
673
public function testSingleChoiceExpandedWithoutTranslation ()
656
674
{
657
675
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
658
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
676
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
677
+ 'choices_as_values ' => true ,
659
678
'multiple ' => false ,
660
679
'expanded ' => true ,
661
680
'choice_translation_domain ' => false ,
@@ -691,7 +710,8 @@ public function testSingleChoiceExpandedWithoutTranslation()
691
710
public function testSingleChoiceExpandedAttributes ()
692
711
{
693
712
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
694
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
713
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
714
+ 'choices_as_values ' => true ,
695
715
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
696
716
'multiple ' => false ,
697
717
'expanded ' => true ,
@@ -729,7 +749,8 @@ public function testSingleChoiceExpandedAttributes()
729
749
public function testSingleChoiceExpandedWithPlaceholder ()
730
750
{
731
751
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , '&a ' , array (
732
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' ),
752
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ),
753
+ 'choices_as_values ' => true ,
733
754
'multiple ' => false ,
734
755
'expanded ' => true ,
735
756
'placeholder ' => 'Test&Me ' ,
@@ -774,7 +795,8 @@ public function testSingleChoiceExpandedWithPlaceholder()
774
795
public function testSingleChoiceExpandedWithBooleanValue ()
775
796
{
776
797
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , true , array (
777
- 'choices ' => array ('1 ' => 'Choice&A ' , '0 ' => 'Choice&B ' ),
798
+ 'choices ' => array ('Choice&A ' => '1 ' , 'Choice&B ' => '0 ' ),
799
+ 'choices_as_values ' => true ,
778
800
'multiple ' => false ,
779
801
'expanded ' => true ,
780
802
));
@@ -809,7 +831,8 @@ public function testSingleChoiceExpandedWithBooleanValue()
809
831
public function testMultipleChoiceExpanded ()
810
832
{
811
833
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' , '&c ' ), array (
812
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' , '&c ' => 'Choice&C ' ),
834
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
835
+ 'choices_as_values ' => true ,
813
836
'multiple ' => true ,
814
837
'expanded ' => true ,
815
838
'required ' => true ,
@@ -854,7 +877,8 @@ public function testMultipleChoiceExpanded()
854
877
public function testMultipleChoiceExpandedWithoutTranslation ()
855
878
{
856
879
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' , '&c ' ), array (
857
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' , '&c ' => 'Choice&C ' ),
880
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
881
+ 'choices_as_values ' => true ,
858
882
'multiple ' => true ,
859
883
'expanded ' => true ,
860
884
'required ' => true ,
@@ -900,7 +924,8 @@ public function testMultipleChoiceExpandedWithoutTranslation()
900
924
public function testMultipleChoiceExpandedAttributes ()
901
925
{
902
926
$ form = $ this ->factory ->createNamed ('name ' , 'choice ' , array ('&a ' , '&c ' ), array (
903
- 'choices ' => array ('&a ' => 'Choice&A ' , '&b ' => 'Choice&B ' , '&c ' => 'Choice&C ' ),
927
+ 'choices ' => array ('Choice&A ' => '&a ' , 'Choice&B ' => '&b ' , 'Choice&C ' => '&c ' ),
928
+ 'choices_as_values ' => true ,
904
929
'choice_attr ' => array ('Choice&B ' => array ('class ' => 'foo&bar ' )),
905
930
'multiple ' => true ,
906
931
'expanded ' => true ,
0 commit comments