File tree 1 file changed +2
-6
lines changed
Filter options
src/Symfony/Bundle/FrameworkBundle/Test 1 file changed +2
-6
lines changed
Original file line number Diff line number Diff line change 15
15
use PHPUnit \Framework \Constraint \LogicalNot ;
16
16
use Symfony \Component \DomCrawler \Crawler ;
17
17
use Symfony \Component \DomCrawler \Test \Constraint as DomCrawlerConstraint ;
18
- use Symfony \Component \DomCrawler \Test \Constraint \CrawlerSelectorAttributeValueSame ;
19
18
use Symfony \Component \DomCrawler \Test \Constraint \CrawlerSelectorExists ;
20
19
21
20
/**
@@ -87,17 +86,14 @@ public static function assertInputValueNotSame(string $fieldName, string $expect
87
86
88
87
public static function assertCheckboxChecked (string $ fieldName , string $ message = '' ): void
89
88
{
90
- self ::assertThat (self ::getCrawler (), LogicalAnd::fromConstraints (
91
- new CrawlerSelectorExists ("input[name= \"$ fieldName \"] " ),
92
- new CrawlerSelectorAttributeValueSame ("input[name= \"$ fieldName \"] " , 'checked ' , 'checked ' )
93
- ), $ message );
89
+ self ::assertThat (self ::getCrawler (), new CrawlerSelectorExists ("input[name= \"$ fieldName \"]:checked " ), $ message );
94
90
}
95
91
96
92
public static function assertCheckboxNotChecked (string $ fieldName , string $ message = '' ): void
97
93
{
98
94
self ::assertThat (self ::getCrawler (), LogicalAnd::fromConstraints (
99
95
new CrawlerSelectorExists ("input[name= \"$ fieldName \"] " ),
100
- new LogicalNot (new CrawlerSelectorAttributeValueSame ("input[name= \"$ fieldName \"] " , ' checked ' , ' checked ' ))
96
+ new LogicalNot (new CrawlerSelectorExists ("input[name= \"$ fieldName \"]: checked " ))
101
97
), $ message );
102
98
}
103
99
You can’t perform that action at this time.
0 commit comments