Confusing warning message "Class ... cannot be found " when class does not extend TestCase #5364
Labels
feature/test-runner
CLI test runner
type/bug
Something is broken
version/9
Something affects PHPUnit 9
version/10
Something affects PHPUnit 10
Current behavior
When a
*Test.php
class exists but does not extendTestCase
, the warning emitted is:This is confusing because there is a valid class at that path, so the user spends time checking namespace match, autoloader configuration etc.
How to reproduce
Create a class
/tests/Foo.php
:Warning when running PHPUnit:
Expected behavior
The text can be improved something like:
The text was updated successfully, but these errors were encountered: