If I want to run a test with just one data from the data provider how would I do it?
I tried the solution on this thread and did not work Cannot run single test with data provider in PHPUnit
I found out that just adding #n
would just work for numerically indexed data providers.
phpunit --filter ClassName::testName#datasetNumber
Add @name
for associatively indexed named data providers.
phpunit --filter ClassName::testName@datasetName
Or you can use regular expressions. See the documentation for more examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With