Skip to content
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

Test Runner does not warn about conflicting options #5076

Closed
joachim-n opened this issue Oct 11, 2022 · 2 comments
Closed

Test Runner does not warn about conflicting options #5076

joachim-n opened this issue Oct 11, 2022 · 2 comments
Assignees
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@joachim-n
Copy link

Q A
PHPUnit version 9.5.20
PHP version 8.9
Installation Method Composer

Summary

I ran vendor/bin/phpunit path/to/tests/ --filter=methodName --list-tests.

Current behavior

I got the list of ALL tests in path/to/tests/.

How to reproduce

Expected behavior

Show only tests matching methodName:

  • multiple methods in different classes with the same name
  • methods that match the given name
  • data provider IDs if any of those methods have a data provider.

Alternatively, if this is by design warn that --list-tests and --filter options are not compatible.

@joachim-n joachim-n added the type/bug Something is broken label Oct 11, 2022
@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Oct 11, 2022
@sebastianbergmann sebastianbergmann changed the title --list-tests doesn't take --filter into account Test Runner does not warn about conflicting options Oct 12, 2022
@sebastianbergmann sebastianbergmann self-assigned this Oct 12, 2022
sebastianbergmann added a commit that referenced this issue Oct 12, 2022
@sebastianbergmann
Copy link
Owner

This is working as intended. However, it was unclear that any filtering is ignored when tests or suites are listed. Hope it's better now.

@joachim-n
Copy link
Author

I actually think it would be a nice feature.
I stumbled on this because I wanted a quick overview of the datasets for a particular test method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants