在安裝之前,需要配置好PHPUnit的開發(fā)環(huán)境。在PHPUnit的新版本已經(jīng)遷移到自己的pear.phpunit.de網(wǎng)站上了。本文假設(shè)你已經(jīng)配置好Xampp的開發(fā)環(huán)境,我之前的文章PHP開發(fā)環(huán)境的搭建。
首先升級你的pear版本,新PHPUnit 3.6 要求PEAR的版本較高。在開始菜單打開CMD命令行。
cd /d D:xamppphp
pear config-show
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover 1
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir D:xamppphp
PEAR documentation directory doc_dir D:xamppphpdocs
PHP extension directory ext_dir D:xamppphpext
PEAR directory php_dir D:xamppphppear
PEAR Installer cache directory cache_dir D:xamppphp mp
PEAR configuration file cfg_dir D:xamppphpcfg
directory
PEAR data directory data_dir D:xamppphpdata
PEAR Installer download download_dir D:xamppphp mp
directory
PHP CLI/CGI binary php_bin D:xamppphp.php.exe
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir D:xamppphp mp
PEAR test directory test_dir D:xamppphp ests
PEAR www files directory www_dir D:xamppphpwww
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:gnupggpg.exe
Signature Key Directory sig_keydir C:Windowspearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename C:Windowspear.ini
System Configuration File Filename C:Windowspearsys.ini
以上是我的pear配置文件,僅供參考,輸入以下命令升級pear的版本