Skip to content

Instantly share code, notes, and snippets.

@ecentinela
Created May 26, 2011 16:56
Show Gist options
  • Save ecentinela/993505 to your computer and use it in GitHub Desktop.
Save ecentinela/993505 to your computer and use it in GitHub Desktop.
Install PHPUnit in MAMP
cd /Applications/MAMP/bin
ln -s php5.3 php5
php5/bin/pear channel-discover pear.phpunit.de
php5/bin/pear channel-discover components.ez.no
php5/bin/pear channel-discover pear.symfony-project.com
php5/bin/pear channel-update pear.php.net
php5/bin/pear upgrade pear
php5/bin/pear install phpunit/PHPUnit
ln -s /Applications/MAMP/bin/php5/bin/phpunit /usr/local/bin/phpunit
phpunit --version
@aa21
Copy link

aa21 commented Oct 9, 2021

update for 2021:

cd /Applications/MAMP/bin
ln -s php/php7.4.21 php7
php7/bin/pear channel-discover pear.phpunit.de
php7/bin/pear channel-discover components.ez.no
php7/bin/pear channel-discover pear.symfony-project.com
php7/bin/pear channel-update pear.php.net
php7/bin/pear upgrade pear
php7/bin/pear install phpunit/PHPUnit
ln -s /Applications/MAMP/bin/php7/bin/phpunit /usr/local/bin/phpunit
phpunit --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment