首页 > 代码库 > [转]在Windows中安装PhpUnit
[转]在Windows中安装PhpUnit
FROM : http://www.cnblogs.com/heiing/archive/2012/09/07/2674807.html
步骤:
- 安装 pear ,参见http://www.cnblogs.com/heiing/archive/2011/12/07/2279405.html
- 安装 PHPUnit,参见http://www.phpunit.de/manual/3.7/en/installation.html
pear config-set auto_discover 1pear install pear.phpunit.de/PHPUnit
输出
Attempting to discover channel "pear.phpunit.de"...downloading channel.xml ...Starting to download channel.xml (804 bytes)....done: 804 bytesAuto-discovered channel "pear.phpunit.de", alias "phpunit", adding to registryAttempting to discover channel "pear.symfony-project.com"...downloading channel.xml ...Starting to download channel.xml (865 bytes)...done: 865 bytesAuto-discovered channel "pear.symfony-project.com", alias "symfony", adding to registryDid not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automaticallyphpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0)phpunit/PHP_CodeCoverage can optionally use PHP extension "xdebug" (version >= 2.0.5)downloading PHPUnit-3.6.12.tgz ...Starting to download PHPUnit-3.6.12.tgz (119,220 bytes)...done: 119,220 bytesdownloading File_Iterator-1.3.1.tgz ...Starting to download File_Iterator-1.3.1.tgz (5,157 bytes)...done: 5,157 bytesdownloading Text_Template-1.1.1.tgz ...Starting to download Text_Template-1.1.1.tgz (3,622 bytes)...done: 3,622 bytesdownloading PHP_CodeCoverage-1.1.3.tgz ...Starting to download PHP_CodeCoverage-1.1.3.tgz (132,726 bytes)...done: 132,726 bytesdownloading PHP_Timer-1.0.2.tgz ...Starting to download PHP_Timer-1.0.2.tgz (3,686 bytes)...done: 3,686 bytesdownloading PHPUnit_MockObject-1.1.1.tgz ...Starting to download PHPUnit_MockObject-1.1.1.tgz (19,897 bytes)...done: 19,897 bytesdownloading YAML-1.0.6.tgz ...Starting to download YAML-1.0.6.tgz (10,010 bytes)...done: 10,010 bytesdownloading PHP_TokenStream-1.1.3.tgz ...Starting to download PHP_TokenStream-1.1.3.tgz (9,860 bytes)...done: 9,860 bytesinstall ok: channel://pear.phpunit.de/File_Iterator-1.3.1install ok: channel://pear.phpunit.de/Text_Template-1.1.1install ok: channel://pear.phpunit.de/PHP_Timer-1.0.2install ok: channel://pear.symfony-project.com/YAML-1.0.6install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.3install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.1.3install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.1.1install ok: channel://pear.phpunit.de/PHPUnit-3.6.12
此时应发现 php 目录下,有phpunit,phpunit.bat两个文件,PEAR目录下有PHPUnit目录。
使用 phpunit --version 有 PHPUnit 3.6.12 by Sebastian Bergmann. 输出,说明安装成功。
[转]在Windows中安装PhpUnit
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。