-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcoverage.php
46 lines (36 loc) · 1.34 KB
/
coverage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/*
Sample atoum configuration file to have code coverage in html format and the treemap.
Do "php path/to/test/file -c path/to/this/file" or "php path/to/atoum/scripts/runner.php -c path/to/this/file -f path/to/test/file" to use it.
*/
use \mageekguy\atoum;
// HTML
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageHtmlField = new atoum\report\fields\runner\coverage\html('Queue Client', 'codeCoverage');
/*
Please replace in next line http://url/of/web/site by the root url of your code coverage web site.
*/
$coverageHtmlField->setRootUrl('/');
// Treemap (not mandatory)
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageTreemapField = new atoum\report\fields\runner\coverage\treemap('Queue Client', 'codeCoverage');
/*
Please replace in next line http://url/of/treemap by the root url of your treemap web site.
*/
$coverageTreemapField
->setTreemapUrl('')
->setHtmlReportBaseUrl($coverageHtmlField->getRootUrl())
;
$script
->addDefaultReport()
->addField($coverageHtmlField)
->addField($coverageTreemapField)
;
$cloverWriter = new atoum\writers\file('coverage.xml');
$cloverReport = new atoum\reports\asynchronous\clover();
$cloverReport->addWriter($cloverWriter);
$runner->addReport($cloverReport);