From 39ba5b37ef86545382dff63d055b0bfc7f805aed Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Fri, 25 Mar 2011 00:29:50 +0100 Subject: [PATCH] Ignore a couple of files for code coverage that should not be covered; add a simle run-tests script that steals some code from photon to return the code coverage at the end of the test execution (we're only at about 8% - lots of work left...) --- phpunit.xml | 12 ++++++++++++ run-tests | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 run-tests diff --git a/phpunit.xml b/phpunit.xml index 00db39e..21fb44e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -12,4 +12,16 @@ test/IDF/ + + + + src/IDF + + src/IDF/Tests + src/IDF/conf + src/IDF/version.php + + + + diff --git a/run-tests b/run-tests new file mode 100755 index 0000000..bc166f6 --- /dev/null +++ b/run-tests @@ -0,0 +1,14 @@ +#!/usr/bin/env php +>> code coverage %s/%s (%s%%)'."\n", + $xml->project->metrics['coveredstatements'], + $xml->project->metrics['statements'], + round(($xml->project->metrics['coveredstatements']/(float)$xml->project->metrics['statements']) * 100.0, 2) +); +