epsilones
epsilones

Reputation: 11609

phpUnit-pear installation issue

I am installing a project from github, called gitlist, you can find it here. I installed composer so to manage all the dependencies. But when building with ant, I always have a message telling me the building failed trying to exectute 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"/>`

In fact, I had already installed phpUnit with pear and it seemed to work. Thinking it could be a problem with phpUnit's installation, I tryied to install it again from pear but now I have this message :

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

Btw, running this command : phpunit, I get this message

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

Upvotes: 2

Views: 312

Answers (1)

cweiske
cweiske

Reputation: 31078

This is no error.

PHPUnit works and ran the tests. One test failed: Tests: 6, Assertions: 42, Failures: 1.

This is not PHPUnit's fault; it's working fine.

Upvotes: 1

Related Questions