PHPUnit should be installed using the PEAR Installer. This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP since version 4.3.0.
PHPUnit 3.6 requires PHP 5.2.7 (or later) but PHP 5.3.3 (or later) is highly recommended.
PHP_CodeCoverage, the library that is used by PHPUnit 3.6 to collect and process code coverage information, depends on Xdebug 2.0.5 (or later) but Xdebug 2.1.0 (or later) is highly recommended.
The PEAR channel (
pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment. Furthermore, component that PHPUnit depends upon are hosted on additional PEAR channels.
sudo /opt/lampp/bin/pear channel-discover pear.phpunit.de
sudo /opt/lampp/bin/pear channel-discover components.ez.no
sudo /opt/lampp/bin/pear channel-discover pear.symfony-project.com
This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel:
sudo /opt/lampp/bin/pear install phpunit/PHPUnit
After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually