Sunday, June 30, 2013

Install phpunit on windows

In the command prompt, switch to the directory that you installed PHP to by running
cd C:\php\

Then install PEAR by running

Press Enter to accept the default when it asks you “Are you installing a system-wide PEAR or a local copy?”
Press Enter again to accept the file layout.
Press Enter to finish.

Run the following commands (they may take a while to update, be patient):
pear channel-update
pear upgrade-all
pear channel-discover
pear channel-discover
pear channel-discover
pear update-channels

To install PHPUnit, run
pear install --alldeps --force phpunit/PHPUnit

To test that PHPUnit was successfully installed, run
phpunit -v

If it fails on line pear install --alldeps --force phpunit/PHPUnit: No releases available for package "" install failed
try pear clear-cache 

No comments:

Post a Comment