One of the ways to install PHPUnit is through PHP Pear. You must already have PHP Pear installed. This is verified to work on Mac OS X Snow Leopard.

To install PHPUnit through PHP PEAR, the following channels have to be added before an install:

[code lang=“bash”]pear channel-discover pear.phpunit.de

pear channel-discover pear.symfony-project.com

pear channel-discover components.ez.no

pear install phpunit/PHPUnit[/code]

Try running:

[code lang=“bash”]phpunit –version[/code]

You should see the following response:

[code lang=“bash”]PHPUnit 3.5.0 by Sebastian Bergmann.[/code]

comments powered by Disqus