Instructions for Mac only.
-
Install the latest version of PHP. I used a one liner from http://php-osx.liip.ch/. The package comes with many useful extensions (like PHPUnit)
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4 -
Add that version to your path in your bash profile
export PATH="/usr/local/php5/bin:$PATH" -
Confirm you are using the latest version
which phporphp -vwill work -
Confirm you have access to phpunit by simply running
phpunitin terminal. -
Refer to the PHPUnit documentation to start testing.
You may also want to check out composer, a php package manager.
Useful links
- http://net.tutsplus.com/tutorials/php/test-driven-development-in-php-first-steps/
- https://github.com/composer/composer
- http://getcomposer.org/doc/00-intro.md#installation
- http://packagist.org/packages/EHER/PHPUnit
- https://github.com/sebastianbergmann/phpunit/
- http://www.phpunit.de/manual/3.6/en/phpunit-book.html