我正在从github安装一个项目,叫做gitlist,你可以在here上找到它。我安装了composer so来管理所有的依赖项。但是,在使用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发布于 2013-01-02 16:25:13
这不是错误。
PHPUnit正常工作并运行测试。有一个测试失败:Tests: 6, Assertions: 42, Failures: 1.
这不是PHPUnit的错;它工作得很好。
https://stackoverflow.com/questions/13019813
复制相似问题