Home  >  Article  >  Backend Development  >  Windows环境装配PEAR、PHPUnit

Windows环境装配PEAR、PHPUnit

WBOY
WBOYOriginal
2016-06-13 10:40:14907browse

Windows环境安装PEAR、PHPUnit

PS:原创文章,如需转载,请注明出处,谢谢!????

本文地址:http://flyer0126.iteye.com/blog/1441817

?

Windows环境下安装PHPUnit,在此整理一下,以便大家参考。

本人测试安装环境:Windows7(win32) + Apache(2.2.13) + PHP(5.3.6)

1.??? 以管理员身份打开控制台窗口;
2.??? 进入php安装目录,在安装PEAR之前需要配置安装PHP环境,如果没有自带PEAR;
3.??? 首先安装PEAR:
??????? >go-pear.bat
??????? 然后一直敲回车键(Enter)
4.??? 提示PEAR默认扩展包安装完成后,允许提示配置php.ini文件中的include_path选项指向pear的安装目录,输入“Y”并回车;
5.??? 关闭此控制台窗口;双击文件“PEAR_ENV.reg”,将相关信息导入注册表;重启Apache;
6.??? 重新以管理员身份打开一个新的控制台窗口;
7.??? 接下来,可以进行PHPUnit的安装:
??????? >pear channel-discover pear.phpunit.de
??????? >pear install phpunit/PHPUnit
8.??? 如果提示安装失败,应该是版本问题,需要下载更新:
??????? >pear upgrade-all
??????? 可以通过pear –V查看版本信息
9.??? 更新完成后,可以重新进行PHPUnit安装:
??????? >pear channel-discover pear.phpunit.de
??????? >pear install phpunit/PHPUnit

??????? 如果出现错误如下:

????????? No releases available for package "pear.phpunit.de/PHPUnit" install failed。
10.??? 解决方式如下:

??????? >pear clear-cache(清除错误记录信息缓存)

??????? >pear install –a -f phpunit/PHPUnit(重新安装)
11.??? 安装完成!

?

?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn