This is a quick description of how I got PHPUnit working on Windows without installing PEAR
The PHPUnit documentation is a cryptic and sparse when describing how to install PHPUnit on windows.
I am assuming that PHP is already installed and working.
Steps:
- Download the latest version of PHPUnit (currently 3.4.9) from here http://pear.phpunit.de/get/
- Extract to somewhere (I put it in my PHP directory)
- Edit the phpunit.bat file. At the bottom of the file there are two lines:
set PHPBIN="@php_bin@"
%PHPBIN% "@bin_dir@\phpunit" %* - Change them to something like this:
set PHPBIN="C:\Program Files (x86)\PHP\php.exe"
%PHPBIN% "C:\Program Files (x86)\PHP\phpunit.php" %* - To test if PHPUnit is working run “
phpunit --help” from a command prompt (PHP directory needs to be set in the path environment variable).
Advertisement
Filed under: Programming