2009-12-03 12 views
2

Existe-t-il un moyen pour que Phing produise son rapport de couverture au format trèfle?Couverture de trèfle avec Phing

Je sais que phpunit a --coverage-trover mais je ne sais pas comment activer cette option de Phing.

Je ne veux pas utiliser manuellement la commande exec < - elle supprime le point de Phing.

J'utilise Phing 2.4RC2

Merci.

Répondre

1

J'ai fait quelques recherches et Phing ne supporte pas la couverture de trèfle, vous avez pour utiliser exec.

Voici ma commande exec:

< commande exec = "phpunit --bootstrap = $ {} projet /test/bootstrap.php --log-JUnit $ {rapport} /logfile.xml --coverage -clover $ {report} /coverage/clover.xml --coverage-source $ {report}/couverture --coverage-html $ {rapport}/coverage-html/$ {projet} test/* "/ >

4

Phing prend en charge la sortie au format trèfle à partir de la version 2.4, voir http://www.phing.info/docs/stable/hlhtml/index.html#d5e12507

<phpunit codecoverage="true"> 
    <formatter type="clover" outfile="clover.xml"/> 
    <!-- ... --> 
</phpunit> 
<phpunit codecoverage="true"> 
    <formatter type="clover" outfile="clover.xml"/> 
    <!-- ... --> 
</phpunit>