Indefero

Indefero Git Source Tree


Root/run-tests

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env php
<?php
 
$xmlfile = dirname(__FILE__) .'/test/report.xml';
passthru('phpunit --coverage-clover='.$xmlfile);
$xml = simplexml_load_string(file_get_contents($xmlfile));
unlink($xmlfile);
printf(
   '>>> 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)
);

Archive Download this file

Page rendered in 0.12325s using 11 queries.