1. Install PEAR by running go-pear.bat

if it starts to complain about: “… does not have a signature …” change the go-pear.bat to the following:

@ECHO OFF
set PHP_BIN=php.exe
%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar
pause

In windows the last part of the output will be something like:

Would you like to alter php.ini ? [Y/n] :

php.ini include_path updated.

Current include path : .
Configured directory : D:\Zend Server 5.3.1\ZendServer\bin\pear
Currently used php.ini (guess) : D:\Zend Server 5.3.1\ZendServer\etc\php.ini
Press Enter to continue:

** WARNING! Old version found at D:\Zend Server 5.3.1\ZendServer\bin, please remove it or be sure to use the new d:\zend
server 5.3.1\zendserver\bin\pear.bat command

The ‘pear’ command is now at your service at d:\zend server 5.3.1\zendserver\bin\pear.bat

* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under D:\Zend Server 5.3.1\ZendServer\bin\PEAR_ENV.reg .
This file creates ENV variables for the current user.

Double-click this file to add it to the current user registry.

2. Update pear:

pear channel-update pear.php.net

and

pear upgrade pear

3. Install PHPUnit via PEAR by running:

pear channel-discover pear.phpunit.de

and

pear install phpunit/PHPUnit

see also: Chapter 3. Installing PHPUnit