如果没有安装pear请看我博客中pear安装一文。
确定pear安装成功后,就可以安装PHPUnit了
这是一个非常简单而愉快的事情
官方文档:http://www.phpunit.de/manual/3.0/en/installation.html
1)进入php安装目录
2) The PEAR channel (pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment:
执行:pear channel-discover pear.phpunit.de
3) This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel:
执行:pear install phpunit/PHPUnit
然后就完成了