- Once you have installed and setup WAMP, open up the command prompt and go to your php directory in WAMP
C:\>cd wamp\bin\php\php5.2.5
- From here you must run the go-pear.bat file to install PEAR and all the files needed for it
C:\wamp\bin\php\php5.2.5>go-pear.bat
- When executed PEAR will ask you a series of question to set itself up correctly, if you don’t know what your doing then just accept the defaults
- Once installed you must run the PEAR_ENV.reg which will create the environment variables for the user, so that PEAR can be called in any directory on the command line>
C:\wamp\bin\php\php5.2.5>PEAR_ENV.reg
For me, it seemed to work no problem, but if you cannot call PEAR from the command prompt, then you must manually add the directory to the path in the Environment Variables list, found in System Properties -> Advanced-> Environment Variables, then add the directory C:\wamp\bin\php\php5.2.5 to the PATH variable
- Once you have PEAR setup, then you must register the PHPUnit channel with PEAR
C:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
- Now you can use the PEAR to install packages from the PHPUnit channel
C:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit
- You should now find the PHPUnit source files under the PHP directory
Easy to understand,I like it!
This is a great post. Thanks so much for sharing, like always.
nice post,thanks for share.