giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
601 stars 270 forks source link

Fix phpunit 9.4 method filter #449

Closed pajon closed 3 years ago

pajon commented 3 years ago

Issue source TestSuite::addTestMethod()

ctrlaltca commented 3 years ago

I just tried to upgrade from phpunit-selenium 8 to phpunit-selenium dev-master (using phpunit 9) and I found out all the methods were run as tests, not only the ones starting with the test prefix. This patch fixes the issue, but I have 2 doubts:

  1. TestUtil::isTestMethod() already checks for the method to be public, why the check is duplicated here? maybe the public check is not present in all the phpunit 9 versions?
  2. this patch only fixes the issue for the single-browser execution branch, probably it's also needed for the multiple-browser execution branch (same file, line 150)
tth80 commented 3 years ago

I believe what @ctrlaltca said is correct. We tried to upgrade to the phpunit 9 version and experienced the same issues. I'm a bit curious on how this PR has been open since October. Is nobody else using phpunit 9 with selenium yet?

bobemoe commented 3 years ago

Oh I just reported this as #453

ctrlaltca commented 3 years ago

@thewunder do you plan to address https://github.com/giorgiosironi/phpunit-selenium/pull/449#issuecomment-734933326 too? Do you want me to open another PR with the fixes?