I want to write this because it is very poorly documented and many websites/forums don’t include the instructions that actually work.
First off I’m assuming xampp is installed to C:\xampp
1. Open a command prompt and go to C:\xampp\php
2. Type “pear update-channels” (updates channel definitions)
3. Type “pear upgrade” (upgrades all existing packages and pear)
4. Type “pear channel-discover components.ez.no” (this is needed for PHPUnit)
5. Type “pear channel-discover pear.symfony-project.com” (also needed by PHPUnit)
6. Type “pear channel-discover pear.phpunit.de” (This IS phpunit)
7. Type “pear install –alldeps phpunit/PHPUnit” (installs PHPUnit and all dependencies)
You may have to edit “memory_limit” in your php.ini if you get some sort of memory error, just set it to something really large, then back when your done.
Most forums tell you only steps 6 and 7 (but without the –alldeps option). This isn’t enough from what I experienced.