How To Install PHPUnit on Windows

In this tutorial I will let you know how to install pears in windows. PEAR is a framework and distribution system for reusable PHP components. You can find PHP pears Here. PHP providing many pears like PHPUnit, GDlib etc, here you will learn how to install and upgrade your PHP pears in window.

Below are sample steps to needed install PHP unit in your system, I am assuming you have installed PHP in your system
First off I’m assuming xampp is installed to C:\xampp

1. Open a command prompt and go to C:\xampp\php
2. Type php -v, if you get php version that’s means PHP installed otherwise first install PHP.
3. Type pear update-channels (This command will updates all channel definitions)
4. Type pear upgrade (This command will upgrades all existing packages and pear)
5. Type pear channel-discover (This IS phpunit pear)
6. Type pear install --alldeps phpunit/PHPUnit (installs PHPUnit and all dependencies)