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

1、Windows的開始 -> 運行 ->cmd

2、安裝命令

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

     Are you installing a system-wide PEAR or a local copy?
    (system|local) [system] : 敲擊回車鍵 (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

接下來一直回車,后

PHP 目錄會多出一個文件 PEAR_ENV.reg ,雙擊導入注冊表。

輸入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命令對pear進行升級,因為phpunit的安裝對pear的版本有要求。

后,pear install phpunit/PHPUnit安裝phpunit。

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

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