Field Notes from the Workshop · № 151 Programming

Installing WAMP and PHPUnit on Windows

Joshua Doodnauth Software Engineer · Toronto
November 5, 2008 2 min read 244 words
  1. Download and Install WAMP
  2. 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

  3. 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

  4. 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
  5. 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

  6. 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

  7. Now you can use the PEAR to install packages from the PHPUnit channel

    C:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit

  8. You should now find the PHPUnit source files under the PHP directory

…Happy Days