PHPUnit is a unit testing framework for PHP. The following article explains how you can install PHPUnit on your server or desktop machine:
In order to use PHPUnit you must first install PEAR.
sudo apt-get install php-pear
Next you have to update the PEAR channel in order to get updated channel data.
sudo pear channel-update pear.php.net
Then upgrade PEAR to the newest version.
sudo pear upgrade-all
Now to install PHPUnit we have to edit the PEAR config to allow it to autodiscover channels
sudo pear config-set auto_discover 1
Now we can install PHPUnit
sudo pear install pear.phpunit.de/PHPUnit
If you have any questions or suggestions let me know in the comments.