I\'ve got a problem when using command line to run tests: if I run phpunit like this:
phpunit -–no-configuration -–filter testAdd DataTest DataProviderTest.php
The regex in the answer no longer seems to work (at least not in 4.0.12).
It looks like --filter doesn't like the space, and gives the following error:
Fatal error: "preg_match(): Compilation failed: missing ) at offset
This is fixed by replacing the space with \s The quotes also need to get removed (or else the \ needs to be \)
phpunit --filter /::testAdd(\s.*)?$/ DataTest DataProviderTest.php