`
itsoul
  • 浏览: 215885 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

window中用pear安装phpunit

    博客分类:
  • PHP
阅读更多
1.安装pear
1)在命令行中,进入php安装目录,如我的目录D:\php\Zend\ZendServer\bin,运行:

go-pear
若出现以下错误:
phar "D:\php\Zend\ZendServer\bin\PEAR\go-pear.phar" does not have a signature
Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in D:\
php\Zend\ZendServer\bin\PEAR\go-pear.phar on line 1236

解决方法:打开php.ini文件,在最后一行加上:phar.require_hash = Off

4)此时pear应该安装成功了,更新至最新版本:

pear upgrade-all
(这一步挺重要的,phpunit貌似是使用pear的1.9.x才能安装)
2.安装phpunit:
1)添加phpunit的频道

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
2)安装:

pear install phpunit/PHPUnit
若出现此错误:
Fatal error:require_once():Failed opening required ‘Structures/Graph.php’
解决方法如下,下载此压缩包:

http://download.pear.php.net/package/Structures_Graph-1.0.3.tgz

解压并把Structures目录复制到D:\php\Zend\ZendServer\bin\PEAR下

若出现:
could not extract the package.xml file
Error:cannot download “phpunit/XXXX”
可能是pear下载目录的路径有空格如:D:/program files/
解决方法如下:

pear config-set temp_dir "C:\tmp"
pear config-set download_dir "C:\tmp"
这里设置目录的路径无空格就行了,想设哪里到是无所谓。

最后测试下是否安装成功,cmd中运行:

phpunit

3、zendStudio8 整合phpunit

1)、首先在zend studio 中新建一个项目。
2)、在项目项目上右键 出现 Properties ,点击 Properties 在出现的框中选择 PHP Include Path -> Libraries -> Add Library ,选择PHPUnit 3.x 即可。
分享到:
评论

相关推荐

    安装pear和phpunit

    安装pear,phpunit,所有的错误,帮助你解决难题。

    pear及phpUnit的安装教程

    详细的安装教程 自己应经测试的出来的 放心下载

    PHP5.4.3下安装PEAR&PHPUnit;&phpDoc2;

    PHP5.4.3 下安装PEAR、PHPUnit、phpDoc2...

    pear包安装phpunit的方法

    PHPUnit可以通过PHP扩展和程序库(PEAE)获得。 PEAR是可重用PHP组件的框架和分发系统。 安装PHPUnit可以通过PEAR安装程序命令... 尽管使用PEAR安装程序是PHPUnit唯一支持的安装方法,但你还是可以手工安装。 要手工

    php安装xdebug/php安装pear/phpunit详解步骤(图)

    PHP环境中安装pear、phpunit以及xdebug全攻略,大家参考使用吧

    phpunit 3.67 最新版

    pear install phpunit/PHPUnit 方法二 :手动安装 1 从http://pear.phpunit.de/get/下载软件包并解压 2 把解压后的目录加入php.ini中的include_path 3 将脚本pear-phpunit改名为phpunit 4 将phpunit脚本中的@...

    windows下安装pear及phpunit(注意配置好php命令行环境)

    windows下安装pear及phpunit(注意配置好php命令行环境),需要的朋友可以参考下。

    Windows 下的 PHP-PEAR 安装方法

    PHP Pear 安装及使用windows下安装pear及phpunit(注意配置好php命令行环境)PHP 5.0 Pear安装方法PHP pear安装配置教程pear包安装phpunit的...xdebug/php安装pear/phpunit详解步骤(图)PHP性能优化准备篇图解PEAR安装

    PHPUnit PHP测试框架安装方法

    Windows平台LAMP环境XAMPP 1.7.3下如何安装PHPUnit呢? 首先,以管理员身份运行cmd,使用pear添加phpunit频道: D:\xampp\php>pear channel-discover pear.phpunit.de Channel “pear.phpunit.de” is already ...

    PHPUnit安装及使用示例

    安装PHPUnit: 在php的目录下: 复制代码 代码如下: pear channel-discover pear; pear install phpunit/PHPUnit windows下将php的环境变量加入到PATH环境变量中。 简单使用: 复制代码 代码如下: <?php class ...

    composer 安装PHPUnit

    NULL 博文链接:https://vtrtbb.iteye.com/blog/2322089

    PHPUnit_Selenium.zip

    Selenium RC integration for PHPUnit 安装方法:sudo pear install phpunit/PHPUnit_Selenium 标签:PHPUnit

    phpunit附属lib

    如果你在用PHPUNIT会报 include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory include(PHPUnit_Extensions_Database_TestCase.php): failed to open stream: No such...

    CentOS环境下安装PHPUnit的方法分析

    主要介绍了CentOS环境下安装PHPUnit的方法,结合实例形式分析了CentOS环境下安装PHPUnit的步骤、相关问题与解决方法,需要的朋友可以参考下

    使用单元测试工具

    准备工作安装PHPUnit自动安装pearinstallphpunit手动安装下载http://pear.phpunit.de/get/PHPUnit-3.3.9.tgz,解压到PHP目录,将pear-phpunit和pear-phpunit.bat,复制到PHP目录,重命名为phpunit和phpunit.bat,将...

Global site tag (gtag.js) - Google Analytics