You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use --list-tests, I get a list of all the data sets from the data provider:
$ vendor/bin/phpunit Test/Unit/ComponentPHPFile8Test.php --list-tests
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
Available test(s):
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"nothing"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"PHPStorm type var first"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"PHPStorm type class first"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"parameter typehint"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"static call"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"class"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"new"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"repeated"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"current"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"docblock param"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"comment"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"quoted class name"
- DrupalCodeBuilder\Test\Unit\ComponentPHPFile8Test::testQualifiedClassNameExtraction"double quoted class name"
However, these are not in a format that (AFAIK) can be used with the --filter option. That needs an @ before the quote marks (and the quote marks are only needed if there are spaces in the data set name):
I'm looking for a way to run tests in parallel, invoking --filter to run phpunit with just a single test, and currently there is no easy way to get a list of tests in a test suite that could be passed back to --filter.
Thanks, that looks like it can work. I found that paratest can already do what I need, but for something more custom or even to make building something like paratest possible that doesn't depend on PHPUnit internals, #4449 would be a useful change.
If I use --list-tests, I get a list of all the data sets from the data provider:
However, these are not in a format that (AFAIK) can be used with the --filter option. That needs an @ before the quote marks (and the quote marks are only needed if there are spaces in the data set name):
Proposed improvement: print the '@' between the method name and the dataset name in the output, so it's easier to copy-paste it to run a test.
The text was updated successfully, but these errors were encountered: