--list-tests
and --list-tests-xml
CLI options do not report error when data provider method throws exception
#5908
Labels
feature/data-provider
Data Providers
feature/test-runner
CLI test runner
type/bug
Something is broken
version/10
Something affects PHPUnit 10
version/11
Something affects PHPUnit 11
Summary
list-tests
(list-tests-xml
) command doesn't report any error ifdataProvider
throws an exception and just return smaller list of testsAs this command(s) often used for CI environment and parallel runs, skipping this exception leads to false positive CI result.
Current behavior
How to reproduce
vendor/bin/phpunit tests --list-tests
Expected behavior
I would expect displaying an error and do not return 0 code.
The text was updated successfully, but these errors were encountered: