您的位置:軟件測(cè)試 > 開(kāi)源軟件測(cè)試 > 開(kāi)源單元測(cè)試工具 > PHPUnit
windows下安裝PEAR, PHPUnit
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2013/12/23 11:48:50 ] 推薦標(biāo)簽:

1、Windows的開(kāi)始 -> 運(yùn)行 ->cmd

2、安裝命令

   進(jìn)入php所在目錄,執(zhí)行命令:go-pear.bat

     Are you installing a system-wide PEAR or a local copy?
    (system|local) [system] : 敲擊回車(chē)鍵 (Enter)

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type ‘all’ to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : D:APMServ5.2.6PHP
 2. Temporary directory for processing            : D:APMServ5.2.6PHP mp
 3. Temporary directory for downloads             : D:APMServ5.2.6PHP mp
 4. Binaries directory                            : D:APMServ5.2.6PHP
 5. PHP code directory ($php_dir)                 : D:APMServ5.2.6PHPpear
 6. Documentation directory                       : D:APMServ5.2.6PHPdocs
 7. Data directory                                : D:APMServ5.2.6PHPdata
 8. User-modifiable configuration files directory : D:APMServ5.2.6PHPcfg
 9. Public Web Files directory                    : D:APMServ5.2.6PHPwww
10. Tests directory                               : D:APMServ5.2.6PHP ests
11. Name of configuration file                    : D:APMServ5.2.6PHPpear.ini

12. Path to CLI php.exe                           : D:APMServ5.2.6PHP.

1-12, ‘all’ or Enter to continue:  輸入all

接下來(lái)一直回車(chē),后

PHP 目錄會(huì)多出一個(gè)文件 PEAR_ENV.reg ,雙擊導(dǎo)入注冊(cè)表。

輸入pear version,顯示:

PEAR Version: 1.9.4
PHP Version: 5.3.5
Zend Engine Version: 2.3.0
Running on: Windows NT CND0135 5.1 build 2600 (Windows XP Professional Service Pack 3) i586

表示pear已安裝成功。
安裝PHPUnit之前,要把pear的路徑添加到php.ini中

include_path=".;E:wampinphpphp5.3.5PEAR"

接著要添加Channel

pear channel-discover pear.phpunit.de

pear channel-discover components.ez.no

pear channel-discover pear.symfony-project.com

然后,pear upgrade-all命令對(duì)pear進(jìn)行升級(jí),因?yàn)閜hpunit的安裝對(duì)pear的版本有要求。

后,pear install phpunit/PHPUnit安裝phpunit。

安裝失敗要重新安裝時(shí),先執(zhí)行pear clear-cache命令再安裝。

軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠(chéng)聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd