【问题标题】:phpUnit-pear installation issuephpUnit-pear 安装问题
【发布时间】:2012-10-12 18:10:54
【问题描述】:

我正在从 github 安装一个项目,叫做 gitlist,你可以找到它here。我安装了 composer 来管理所有依赖项。但是在使用 ant 构建时,我总是有一条消息告诉我构建尝试执行 phpUnit 失败

     [exec] PHPUnit 3.7.8 by Sebastian Bergmann.
     [exec] 
     [exec] Configuration read from /myroot/Sites/gitproject/gitlist/phpunit.xml.dist
     [exec] 
     [exec] .....F
     [exec] 
     [exec] Time: 3 seconds, Memory: 22.50Mb
     [exec] 
     [exec] There was 1 failure:
     [exec] 
     [exec] 1) InterfaceTest::testHistoryPage
     [exec] Failed asserting that false is true.
     [exec] 
     [exec] /myroot/Sites/gitproject/gitlist/tests/InterfaceTest.php:154
     [exec] 
            FAILURES!
            Tests: 6, Assertions: 42, Failures: 1.

     [exec] Generating code coverage report in Clover XML format ...
     [exec]  done

BUILD FAILED
/myroot/Sites/gitlist/build.xml:74: exec returned: 1

and the 74 line corresponds to `<exec executable="phpunit" failonerror="true"/>`

事实上,我已经用 pear 安装了 phpUnit,它似乎可以工作。认为这可能是 phpUnit 的安装问题,我尝试从 pear 再次安装它,但现在我收到了这条消息:

phpunit/PHPUnit is already installed and is the same as the released version 3.7.8
install failed

顺便说一句,运行这个命令:phpunit,我得到这个消息

Generating code coverage report in Clover XML format ...PHP Warning:  DOMDocument::save(/Users/mehdibenchoufi/Desktop/Sites/gitproject/gitlist/build/logs/clover.xml): failed to open stream: Permission denied in /usr/local/share/pear/PHP/CodeCoverage/Report/Clover.php on line 341
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() /usr/local/share/pear/PHPUnit/TextUI/Command.php:129
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/share/pear/PHPUnit/TextUI/Command.php:176
PHP   5. PHP_CodeCoverage_Report_Clover->process() /usr/local/share/pear/PHPUnit/TextUI/TestRunner.php:362
PHP   6. DOMDocument->save() /usr/local/share/pear/PHP/CodeCoverage/Report/Clover.php:341

【问题讨论】:

    标签: installation phpunit pear


    【解决方案1】:

    这没有错误。

    PHPUnit 工作并运行了测试。一项测试失败:Tests: 6, Assertions: 42, Failures: 1.

    这不是 PHPUnit 的错;它工作正常。

    【讨论】:

      猜你喜欢
      • 2011-09-10
      • 2011-01-01
      • 2012-07-30
      • 2014-01-08
      • 2013-04-03
      • 1970-01-01
      • 2011-01-15
      • 1970-01-01
      • 2014-12-25
      相关资源
      最近更新 更多