
Well, we all love php unit tests :). There are times we would like to run one/single test from test suite that has failed so that we can fix or look at it thoroughly. PHPUnit has a way to do it.
The problem, when you are your php unit suite as
phpunit -c /testFolder..
All you php tests would run.
The solution for this is:
Let’s assume you have this particular php unit test in one of your test files
public function testPhpIsAwesomeOrNot(){ }
All you have to do is to add the <b>group annotation</b> above the function of your php unit test
/** * @group awesome */ public function testPhpIsAwesomeOrNot(){}
and run your PHPUnit single test wiht –group annotation
phpunit -c /testfolder --group awesome
The above would run single PHPUnit test from the test suite.