In order to install PHPUnit using XAMPP you have to issue the following commands:
sudo ./pear channel-update pear.php.net sudo ./pear channel-discover pear.phpunit.de sudo ./pear channel-discover components.ez.no sudo ./pear channel-discover pear.symfony-project.com sudo ./pear install --alldeps phpunit/PHPUnit
First, you (might have to) update PEAR with the changed protocols used by channel pear.php.net. Next, add three channels to satisfy all dependency requirements for PHPUnit. Finally, install PHPUnit using the –alldeps options to automatically discover and install any dependencies. As you might have guessed the commands above originate from a Linux shell (sudo). Therefore, I you plan to use these commands under Windows simply replace “sudo ./pear” with “pear.bat” and you are ready to go. Additionally, depending on your Linux setup and the location of XAMPP you also might not need to be a super user (sudo) to issue these commands.