New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpunit installed via composer leads to "No tests found" warning for PHPUnit Framework internal class(es) when executing a folder containing more test files/classes and filtering (via exclude-group) a whole test class with (a) @group annotation on test class and (b) a data provider throwing an exception #2922
phpunit installed via composer leads to "No tests found" warning for PHPUnit Framework internal class(es) when executing a folder containing more test files/classes and filtering (via exclude-group) a whole test class with (a) @group annotation on test class and (b) a data provider throwing an exception #2922
Comments
Which version of php-file-iterator was installed? |
There are no code changes in the |
Concerning code changes in 6.4 branch I refer to 6.4.5 from https://github.com/sebastianbergmann/phpunit/blob/6.4/ChangeLog-6.4.md |
Concerning php-file-iterator version: "1.4.5" (like allegedly also in the Phar) |
Sorry, I should have done |
@kubawerlos Could this be related to #2833? |
@sebastianbergmann yes, it is. The problem occurs only if ALL these conditions are met:
Fix on the way. |
Thanks a lot for your quick replies and resolution and new release! Two small (?) questions:
|
Thanks again, I can confirm that your fix helped as promised/expected and solved both problems |
It works fine when using:
It started failing when upgrading from PHPUnit 6.4.3 to 6.5.4; after rolling back it seemed to have broken with 6.5.0 already; I am naively strongly suspecting the changes in non-released 6.4.5 (that presumably are part of 6.5.0) are the culprits...
How to reproduce?
A folder with e.g. a normal test ("unfilteredTest.php") and the bad/special one ("bugTest.php") -- just the bad/special one is not (!) sufficient:
The normal test ("unfilteredTest.php"):
And the bad/special test ("bugTest.php"):
When using 'phpunit.phar' it works fine:
BugTest
is correctly excludedBut when using 'phpunit' from composer it fails "funnily":
Now some more details explaining the special circumstances and the long issue title: When there is just the bad/special one:
When reverting the file renaming it works again:
The same "funny" problem for
SkippedTestCase
Please note that we also have the corresponding problem with respect to
SkippedTestCase
, but I have not spent the same enormous amount of time to investigate that problem too, as I claim it must be strongly related with the one above forWarningTestCase
.The text was updated successfully, but these errors were encountered: