Running a single PhpUnit test

Well, we all love tests :). There are times we would like to run a single test that has failed so that we can fix or look at it thoroughly.
The problem, when you are running

phpunit -c /testFolder..

All tests would run.
The fix..
Let’s assume you have this particular test in one of your test files

public function testPhpIsAwesomeOrNot(){
}

All you have to do is to add the group annotation above the function


/**
 * @group awesome
 */
public function testPhpIsAwesomeOrNot(){}

then run it with –group
like
phpunit -c /testfolder –group awesome