Run single phpunit test

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.

Adding user to sudoers in Mac

Working on mac, you might find something the sudo not working as expected or something.
Specially, if you are installing to ‘somehow’ restricted folders like /usr/local/bin ..
Here is what you can do to have an sudo access:
First check the group wheel (mostly) by running the following command

ls -la /private/etc/sudoers 

This shall produce something: -r–r—– 1 root wheel 1242 Jun 22 2009 /private/etc/sudoers
This will tell you the sudoers should be in the wheel group

Then check in what group the user currently is using


From the listed groups, if wheel is not listed then add it

sudo dscl . -append /Groups/wheel GroupMembership