Run a single data set for a phpunit test

Use the –filter argument:

phpunit -c app/ src/some/file/path/to/test.php --filter 'myTestMethod #2'

“#2” specifies the second data set in the dataprovider for myTestMethod in the src/some/file/path/to/test.php test file.

Kudos to Henning for his blog post

Leave a Reply