| Q |
A |
| PHPUnit version |
9.3.8 |
| PHP version |
7.4.8 |
| Installation Method |
Composer |
Summary
When running phpunit in a more or less empty project, "Incorrect filter configuration" is shown when there are no files to cover. This is misleadig.
Current behavior
A misleading error message Warning: Incorrect filter configuration, code coverage will not be processed is shown when no source files present in covered path(s)
How to reproduce
Expected behavior
Show no error message (maybe a warning that there are no files to cover), but 0% coverage, and "No tests executed".
As soon as a (even an empty) .php file is added to the src directory, the expected behaviour is shown.
Summary
When running phpunit in a more or less empty project, "Incorrect filter configuration" is shown when there are no files to cover. This is misleadig.
Current behavior
A misleading error message
Warning: Incorrect filter configuration, code coverage will not be processedis shown when no source files present in covered path(s)How to reproduce
composer installcomposer test-coverageExpected behavior
Show no error message (maybe a warning that there are no files to cover), but 0% coverage, and "No tests executed".
As soon as a (even an empty) .php file is added to the src directory, the expected behaviour is shown.