【问题标题】:Installing PHPUnit with CakePHP on Windows/IIS在 Windows/IIS 上使用 CakePHP 安装 PHPUnit
【发布时间】:2012-06-17 01:53:02
【问题描述】:

我按照 CakePHP 2.x 给出的说明(通过 test.php)安装 PHPUnit:

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit-3.6.4

这一切似乎都成功完成了,但 test.php 仍然显示PHPUnit is not installed!

它还说要验证 PHPUnit 是否在 php.ini 的 include_path 中。我不确定哪个路径应该在 include_path 中。我当前的 include_path 是:

include_path=".;C:\Program Files (x86)\PHP\v5.3\PEAR\pear;C:\Program Files (x86)\PHP\v5.3\pear"

虽然C:\Program Files (x86)\PHP\v5.3\PEAR\ 中有一个PHPUnit-3.5.14.tar 文件,但我没有看到PHPUnit 文件夹或类似的东西。我对 PEAR 很陌生,所以很容易出现根本问题。

我还尝试在运行 PEAR 命令后重新启动 IIS。

【问题讨论】:

  • C:\Program Files (x86)\PHP\v5.3\PEAR\pear 看起来适合包含工作。如果安装正常,您还应该找到C:\Program Files (x86)\PHP\v5.3\PEAR\pear\PHPUnit\Autoload.php。因为 PEAR 安装在 Program Files 中,所以在安装时检查您是否具有管理员权限。文档中还有一个recent change 安装说明。

标签: cakephp phpunit cakephp-2.0 pear


【解决方案1】:

这是几个因素的结合。

我的 PEAR 版本过时了,所以我安装了最新的。 contrebis 的评论也是一个因素,更新了 CakePHP 文档。最后,我在安装 PHPUnit 时遇到了this problem。毕竟,更新了 php.ini 的 include_path,我得到了它的工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-21
    • 1970-01-01
    • 2014-12-22
    • 1970-01-01
    • 1970-01-01
    • 2015-04-06
    • 1970-01-01
    • 2014-04-16
    相关资源
    最近更新 更多