rm /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update pear.php.net
/Applications/MAMP/bin/php/php5.3.6/bin/pear upgrade pear
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-discover pear.phpunit.de
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-discover pear.symfony-project.com
/Applications/MAMP/bin/php/php5.3.6/bin/pear install phpunit/PHPUnit
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update pear.php.net
/Applications/MAMP/bin/php/php5.3.6/bin/pear upgrade pear
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-discover pear.phpunit.de
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-discover pear.symfony-project.com
/Applications/MAMP/bin/php/php5.3.6/bin/pear install phpunit/PHPUnit
To test this, you can run the following in Terminal:
/Applications/MAMP/bin/php/php5.3.6/bin/phpunit --version
Caution: before performing the next step, make sure that you won't be conflicting with another installation of PHPUnit!
To run php unit with the command "phpunit", you can make a symlink to the phpunit binary in a directory that is defined in your PATH, such as /usr/local/bin, e.g.:
sudo ln -s /Applications/MAMP/bin/php/php5.3.6/bin/phpunit /usr/local/bin/phpunit
No comments:
Post a Comment