Search code examples
phpcode-coveragephingclover

Clover coverage with Phing


Is there a way to get Phing to output it's coverage report in clover format?

I know phpunit has --coverage-clover but I don't know how to enable this option from Phing.

I do not want to manually use the <exec command - it defeats the point of Phing.

I am using Phing 2.4RC2

Thanks.


Solution

  • I did some research and Phing doesn't support Clover coverage, you have to use exec.

    Here is my exec command:

    <exec command="phpunit --bootstrap=${project}/test/bootstrap.php --log-junit ${report}/logfile.xml --coverage-clover ${report}/coverage/clover.xml --coverage-source ${report}/coverage --coverage-html ${report}/coverage-html/ ${project}test/*"/>