How to install PEAR and PHPUnit in Debian/Ubuntu
Tue Jun 14 00:00:00 UTC 2011
In general terms, it's very easy to install/upgrade new software in APT distros such as Debian/Ubuntu.
I don't want to say doing so for PHPUnit or PEAR is more difficult, but has a little, tricky part, upgrading PEAR. If you don't upgrade PEAR, PHPUnit will complain about an insufficient version and the installation will abort.
sudo apt-get install php-pear
sudo pear channel-update pear.php.net
sudo pear upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install -a phpunit/PHPUnit
Additionally, if you want to include code coverage in your tests, you have to install the xdebug PHP extension.
sudo apt-get install php5-xdebug
Keywords: php,pear,phpunit,debian,ubuntu,apt-getcomments powered by Disqus