First PHPUnit channel must be added
sudo ./pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded
Then pear chanels can be updated
sudo ./pear update-channels
Then we can try to install PHPUnit:
sudo ./pear install phpunit/PHPUnit
phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is 1.7.1
phpunit/PHPUnit requires package "pear/Image_GraphViz" (version >= 1.2.1), installed version is 1.1.0
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
To upgrade pear I used
sudo ./pear upgrade PEAR
To check if upgrade was successful I used ./pear -V
PEAR Version: 1.9.0
PHP Version: 5.2.9
Zend Engine Version: 2.2.0
Running on: Linux arch 2.6.31-ARCH #1 SMP PREEMPT Tue Oct 13 13:36:23 CEST 2009 i686
Before PHPUnit can be upgraded, pear/Image_GraphViz package must be upgraded first. So
sudo ./pear upgrade pear/Image_GraphViz
downloading Image_GraphViz-1.2.1.tgz ...
Starting to download Image_GraphViz-1.2.1.tgz (4,872 bytes)
.....done: 4,872 bytes
upgrade ok: channel://pear.php.net/Image_GraphViz-1.2.1
and install PHPUnit
./pear install -a phpunit/PHPUnit
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.1.tgz ...
Starting to download PHPUnit-3.4.1.tgz (326,659 bytes)
...................................................................done: 326,659 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.1
After this, when I could use PHPUnit with Zend Framework as described in a tutorial here.