Aug
30
在Windows7 windows server 2008 中安装PHPUnit
第一步:安装PEAR,具体安装过程请移步:http://www.zhanghaijun.com/post/952/
第二部:PHPUnit,可参考官方文档,http://phpunit.de/manual/3.7/zh_cn/installation.html
安装:
打开windows 命令行窗口,进入php的目录,本文php目录:D:\wwwroot\php-5.5.16-Win32
输入:
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
开始安装
安装完成你可以看见php目录里面有phpunit和phpunit.bat两个文件了
输入 phpunit --version 可以查看phpunit的版本
D:\wwwroot\php-5.5.16-Win32>phpunit --version
PHPUnit 4.0.17 by Sebastian Bergmann.
You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.
Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.
不过根据上面的内容看,官方2014年12月31号开始就不再支持这种安装方式了。
根据自己的需要安装其他组建包:
pear install phpunit/PHP_Invoker
pear install phpunit/DbUnit
pear install phpunit/PHPUnit_Selenium
pear install phpunit/PHPUnit_Story
pear install phpunit/PHPUnit_SkeletonGenerator
pear install phpunit/PHPUnit_TestListener_DBUS
pear install phpunit/PHPUnit_TestListener_XHProf
pear install phpunit/PHPUnit_TicketListener_Fogbugz
pear install phpunit/PHPUnit_TicketListener_GitHub
pear install phpunit/PHPUnit_TicketListener_GoogleCode
pear install phpunit/PHPUnit_TicketListener_Trac
1:http://phpunit.de/manual/current/en/installation.html
2:http://pear.phpunit.de/
第二部:PHPUnit,可参考官方文档,http://phpunit.de/manual/3.7/zh_cn/installation.html
安装:
打开windows 命令行窗口,进入php的目录,本文php目录:D:\wwwroot\php-5.5.16-Win32
输入:
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
开始安装
安装完成你可以看见php目录里面有phpunit和phpunit.bat两个文件了
输入 phpunit --version 可以查看phpunit的版本
D:\wwwroot\php-5.5.16-Win32>phpunit --version
PHPUnit 4.0.17 by Sebastian Bergmann.
You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.
Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.
不过根据上面的内容看,官方2014年12月31号开始就不再支持这种安装方式了。
根据自己的需要安装其他组建包:
pear install phpunit/PHP_Invoker
pear install phpunit/DbUnit
pear install phpunit/PHPUnit_Selenium
pear install phpunit/PHPUnit_Story
pear install phpunit/PHPUnit_SkeletonGenerator
pear install phpunit/PHPUnit_TestListener_DBUS
pear install phpunit/PHPUnit_TestListener_XHProf
pear install phpunit/PHPUnit_TicketListener_Fogbugz
pear install phpunit/PHPUnit_TicketListener_GitHub
pear install phpunit/PHPUnit_TicketListener_GoogleCode
pear install phpunit/PHPUnit_TicketListener_Trac
1:http://phpunit.de/manual/current/en/installation.html
2:http://pear.phpunit.de/