PHPUnit安装
来源:互联网 发布:淘宝卖家怎么联系淘客 编辑:程序博客网 时间:2024/06/06 03:28
步骤:- 安装 pear ,参见http://www.cnblogs.com/heiing/archive/2011/12/07/2279405.html
- 安装 PHPUnit,参见http://www.phpunit.de/manual/3.7/en/installation.html
步骤:
- 到 http://windows.php.net/downloads/releases/archives/ 下载PHP,解压并重命名到为php5.x.x,进入php5.x.x目录
- 如果需要扩展,打开php.ini,设置 extension_dir = "ext" , 取消对应扩展的注释,并将PHP路径添加到path环境变量中。
- 打开cmd,进入php5.x.x目录,运行go-pear.bat
- 如果找不到go-pear.bat文件1、下载: http://pear.php.net/go-pear.phar 2、命令行下,在php目录下运行
php go-pear.pharPS:如果该命令报错,可能是没有将PHP路径添加到path环境变量中。可能是因为我没有安装PHP的IDE,所以一直没有配置它,偶然之间才想到可能要添加这个环境变量。
- 提示
Are you installing a system-wide PEAR or a local copy?(system|local) [system]
按回车确定
- 提示
1. Installation base ($prefix) : D:\path_to_your_php\php5.x.x2. Temporary directory for processing : D:\path_to_your_php\php5.x.x\tmp 3. Temporary directory for downloads : D:\path_to_your_php\php5.x.x\tmp 4. Binaries directory : D:\path_to_your_php\php5.x.x5. PHP code directory ($php_dir) : D:\path_to_your_php\php5.x.x\pear 6. Documentation directory : D:\path_to_your_php\php5.x.x\docs 7. Data directory : D:\path_to_your_php\php5.x.x\data 8. User-modifiable configuration files directory : D:\path_to_your_php\php5.x.x\cfg 9. Public Web Files directory : D:\path_to_your_php\php5.x.x\www10. Tests directory : D:\path_to_your_php\php5.x.x\tests11. Name of configuration file : D:\path_to_your_php\php5.x.x\pear.ini12. Path to CLI php.exe : D:\path_to_your_php\php5.x.x1-12, ‘all’ or Enter to continue:
确定无误,则按回车,输入数字则修改对应项。修改后,按回车进行安装。
- 生成环境变量PEAR_ENV.reg文件,双击导入注册表
- 此时,输入pear -V 查看版本信息,输入pear list 查看已安装的包
- 如果pear list查看没有 Image_GraphViz 包和 Log 包,则使用 pear install Log 安装Log,使用 pear install Image_GraphViz
- 安装 Image_GraphViz 时,如果提示不能包含Structures/Graph/Node.php,则
- 尝试set查看PHP_PEAR_*相关环境变量是否正确
- 尝试关闭cmd窗口,再打开,再pear install Image_GraphViz
- 尝试pear install Stuctures_Graph,再pear install Image_GraphViz
- 至此,pear list 应有
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:=========================================PACKAGE VERSION STATEArchive_Tar 1.3.3 stableConsole_Getopt 1.2.3 stableImage_GraphViz 1.3.0 stableLog 1.12.7 stablePEAR 1.9.0 stableStructures_Graph 1.0.2 stableXML_Util 1.2.1 stable
此时,使用 pear upgrade-all 即可升级所有的包。
按快捷键 Win + R
,输入cmd并回车。进入存放phpunit.phar的路径。输入 echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
并回车。接着输入 phpunit --version
并回车。如果得到输出 PHPUnit x.y.z by Sebastian Bergmann and contributors.
则表示配置好了(如果有误,输入exit
并回车,重新来一遍)。
将PHPunit的路径添加到path路径变量中。
0 0
- 安装PHPUnit
- PHPUnit安装
- PHPUnit 安装
- phpunit安装
- PHPUnit安装
- phpunit 安装
- phpunit 安装
- phpunit安装
- PHPUnit安装
- PHPUnit使用指南之安装PHPUnit
- centos linux安装PHPUnit 配置PHPUnit (深入浅出PHPUnit 1)
- PHPUnit袖珍指南-第四章 安装PHPUnit
- PHPUnit袖珍指南-第四章 安装PHPUnit
- 【phpunit】phpunit初次安装使用简记
- PHPunit 中phpunit selenium 扩展的安装
- Windows下PHPUnit安装
- 在windows安装PHPUnit
- Windows下PHPUnit安装
- 观察者模式之Scala实现
- Java基础之包管理---访问权限详解
- 002-多项式求值(Horner规则)-归纳法-《算法设计技巧与分析》M.H.A学习笔记
- org.hibernate.MappingException: Unknown entity: DnoFonetoone.Dnfclass
- MySql学习记录
- PHPUnit安装
- CentOS 6.x系统 ipmitool工具
- csv大文件分割以及添加表头
- 前端界面优化
- 第十六周上机实践——项目6-处理C++源代码的程序
- 淘宝网站前端分析
- 移动端web页面知识小结之CSS部分
- xpages获得当前页面url及其参数
- 办公室: 如何把“敌意”同事变成朋友?