views:

240

answers:

2

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.

A: 

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/*"/>

Linus
A: 

Phing supports output to clover format from version 2.4, see http://phing.info/docs/guide/current/chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitTask

Michiel