Goran Jurić

Install phpUnit on Mac OSX 10.6

Published on

Here is another quick How-to so I don’t have to look it up next time.

Open up Terminal.app and enter “sudo su” and enter your password when asked (I guess you must be using an account with administrator privileges).

pear upgrade PEAR
pear channel-discover pear.phpunit.de
pear install --alldeps phpunit/PHPUnit

That’s it. phpunit binary should be in your path now.


For some reason phpUnit that is being used by Zend Studios (6.1) does not have mbstring extension compiled and that makes it unusable for me. I guess there is a way to force PHP interpreter that is being used in the Zend Studio to run with the mbstring extension, but this is a faster approach. Hudson or phpUnderControl (whichever you like) will take care of the code coverage reports.