-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Emit error when (configured) test directory does not exist #4493
Labels
Milestone
Comments
See https://github.com/bytestream/phpunit-4493 for minimal repository. |
This is consistent with what happens when |
sebastianbergmann
changed the title
testsuite does not error when directory doesn't exist
Emit error when (configured) test directory does not exist
Oct 26, 2020
sebastianbergmann
added
feature/test-runner
CLI test runner
type/enhancement
A new idea that should be implemented
and removed
type/bug
Something is broken
labels
Oct 26, 2020
It makes sense to error if an argument is invalid - otherwise it's difficult for people to debug. Paratest for example, throws a configuration exception in this case. |
Thanks! 🎉 |
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Mar 11, 2021
Custom autoloaders are deprecated with PHPUnit 9 and will be removed with PHPUnit 10. Since PHPUnit 8.5 custom autoloaders don't do much because that version removed the ability to launch unit tests by class name and that's exactly the reason we had a custom autoloader (to map class names to files within our tests). See MDL-67673 about when direct use of classes was deprecated (8.5), now removed (9.5). So, as far as it's unused, removing it now, test still can be selectively using any of: - a relative path to file (although there are some restrictions comming with PHPUnit 9, see sebastianbergmann/phpunit#4105 - using --filter, to point to any classname[::method] - using --testsuite to run a complete suite - using --config to point to custom components. Also, commented out the lib/ajax/tests directory because it doesn't exist / is empty and PHPUnit 9 emits error when a configured test directory does not exist. See sebastianbergmann/phpunit#4493. Alternative was to completely remove the configuration line, but decided to keep it around in case some day we want to add some test there.
This was referenced Mar 18, 2021
composer(deps-dev): update phpunit/phpunit requirement from ^9.5.2 to ^9.5.3
codedge/laravel-fpdf#78
Merged
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Summary
--testsuite
does not error when directory does not exist.Current behavior
How to reproduce
phpunit.xml
Create
test/Cache
- note difference in capitalisation, and run:./vendor/bin/phpunit --testsuite=cache --stop-on-failure
Expected behavior
phpunit should error:
The text was updated successfully, but these errors were encountered: