Thursday, October 29, 2009

Installing PHPUNIT2 on Windows system

The following post gives u a detail information about installation of PHPUNIT2 into your wamp server on windows system

Step1. Check your wamp has installed properly on windows system. If it is then open wamp folder and go to the php folder and you should find go-pear.bat file

Step2. open command prompt and go to php directory in wamp

C:\> cd wamp\php

If your wamp structure is different then check for following path

C:\>cd wamp\php\php5.5

But here I am following the wamp\php path for installation. if yours is different than please follow as in your wamp instead of “wamp\php”






Step3.
Run go-pear.bat batch file from this place for complete installation of pear into your wamp php server

C:\cd wamp\php>go-pear.bat

Here it will ask you for some conformation if you don’t know then go with the default selection like [system | local]system:”select system here”

Complete the process like this with all default selection

Step4. once the installation is completed run PEAR_ENV.reg file from this place so that environment variable can be created to the for the user running wamp server. Then only your able to access pear files anywhere in the document root folder

NOTE:if your unable to create environment variable then manually you can create with following steps

Click on system properties->select advanced->Environment variables

Here you can add directory path variable “ c:\wamp\php

Step5. Once your pear setup is over you must register your phpunit channel with the pear registry

C:\wamp\php>pear channel-discover pear.phpunit.de

Step6. Once the register is over now your able to install all supporting packages from the phpunit channel

C:\wamp\php>pear install pear/phpunit2

Then it may ask you to install all supporting packages for phpuint like

C:\wamp\php>pear install pear/benchmark

C:\wamp\php>pear install pear/console_Getopt

Step7. Now you will find phpunit folder under php\pear folder where all subfolder with all utilities will be there now your phpunit as configured and its ready to use in your project

No comments: