You can group and run a select few PHPUnit tests together by using the @group annotation like so:
/**
* @group foo
*/
public function testMethod()
{
// ...
}
Once you have tagged all the tests you wish to group, you can use the following command to only run the tests within that group:
phpunit --group foo
You can also specify multiple @group annotations for any single method, for example, like so:
/**
* @group foo
* @group bar
*/
public function testMethod()
{
// ...
}
You can also specify the @group annotation to the class itself. In that case, all test methods of that test class would be considered a part of that group.