@@ -240,14 +240,16 @@ public function testSingleChoiceAttributes()
240
240
'expanded ' => false ,
241
241
));
242
242
243
+ $ classPart = in_array ('choice_attr ' , $ this ->testableFeatures ) ? '[@class="foo&bar"] ' : '' ;
244
+
243
245
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
244
246
'/select
245
247
[@name="name"]
246
248
[@class="my&class form-control"]
247
249
[not(@required)]
248
250
[
249
251
./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"]
250
- /following-sibling::option[@value="&b"][@class="foo&bar"] [not(@selected)][.="[trans]Choice&B[/trans]"]
252
+ /following-sibling::option[@value="&b"] ' . $ classPart . ' [not(@selected)][.="[trans]Choice&B[/trans]"]
251
253
]
252
254
[count(./option)=2]
253
255
'
@@ -529,6 +531,8 @@ public function testMultipleChoiceAttributes()
529
531
'expanded ' => false ,
530
532
));
531
533
534
+ $ classPart = in_array ('choice_attr ' , $ this ->testableFeatures ) ? '[@class="foo&bar"] ' : '' ;
535
+
532
536
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array ('attr ' => array ('class ' => 'my&class ' )),
533
537
'/select
534
538
[@name="name[]"]
@@ -537,7 +541,7 @@ public function testMultipleChoiceAttributes()
537
541
[@multiple="multiple"]
538
542
[
539
543
./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"]
540
- /following-sibling::option[@value="&b"][@class="foo&bar"] [not(@selected)][.="[trans]Choice&B[/trans]"]
544
+ /following-sibling::option[@value="&b"] ' . $ classPart . ' [not(@selected)][.="[trans]Choice&B[/trans]"]
541
545
]
542
546
[count(./option)=2]
543
547
'
@@ -634,6 +638,8 @@ public function testSingleChoiceExpandedAttributes()
634
638
'expanded ' => true ,
635
639
));
636
640
641
+ $ classPart = in_array ('choice_attr ' , $ this ->testableFeatures ) ? '[@class="foo&bar"] ' : '' ;
642
+
637
643
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
638
644
'/div
639
645
[
@@ -652,7 +658,7 @@ public function testSingleChoiceExpandedAttributes()
652
658
./label
653
659
[.="[trans]Choice&B[/trans]"]
654
660
[
655
- ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)][@class="foo&bar"]
661
+ ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] ' . $ classPart . '
656
662
]
657
663
]
658
664
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
@@ -796,6 +802,8 @@ public function testMultipleChoiceExpandedAttributes()
796
802
'required ' => true ,
797
803
));
798
804
805
+ $ classPart = in_array ('choice_attr ' , $ this ->testableFeatures ) ? '[@class="foo&bar"] ' : '' ;
806
+
799
807
$ this ->assertWidgetMatchesXpath ($ form ->createView (), array (),
800
808
'/div
801
809
[
@@ -814,7 +822,7 @@ public function testMultipleChoiceExpandedAttributes()
814
822
./label
815
823
[.="[trans]Choice&B[/trans]"]
816
824
[
817
- ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)][@class="foo&bar"]
825
+ ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] ' . $ classPart . '
818
826
]
819
827
]
820
828
/following-sibling::div
0 commit comments