Skip to content

Commit

Permalink
Fix the detection of HTML5 support in the testsuite
Browse files Browse the repository at this point in the history
The detection relied on detecting the test method added when introducing
the feature in symfony/dom-crawler. But as of Symfony 4.4, tests are
stripped from the dist archives. An additional detection based on a new
method added in later Symfony version is now used to filter out the
false positives (not detecting 4.4 and newer as being <3.3).
  • Loading branch information
stof committed Mar 10, 2020
1 parent b9b9f09 commit 43eeec1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/BrowserKitConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function skipMessage($testCase, $test)
'testHtml5FormMethod',
))
&& !method_exists('Symfony\Component\DomCrawler\Tests\FormTest', 'testGetMethodWithOverride')
// Symfony 4.4 removed tests from dist archives, making the previous detection return a false-positive
&& !method_exists('Symfony\Component\DomCrawler\Form', 'getName')
) {
return 'Mink BrowserKit doesn\'t support HTML5 form attributes before Symfony 3.3';
}
Expand Down

0 comments on commit 43eeec1

Please sign in to comment.