-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.atoum.php
45 lines (35 loc) · 1.01 KB
/
.atoum.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
<?php
use mageekguy\atoum\reports;
use mageekguy\atoum\reports\coverage;
use mageekguy\atoum\writers\std;
use mageekguy\atoum\report\fields\runner\result\logo;
//
// config of tests
//
// branch coverage
$script->enableBranchAndPathCoverage();
$runner->addTestsFromDirectory(__DIR__ . '/tests/units');
//
// Reports
//
$report = $script->addDefaultReport();
$extension = new reports\extension($script);
$extension->addToRunner($runner);
// html report
$coverage = new coverage\html();
$coverage->addWriter(new std\out());
$coverage->setOutPutDirectory(__DIR__ . '/tests/reports/unit/');
$runner->addReport($coverage);
// telemetry
$telemetry = new reports\telemetry();
$telemetry->addWriter(new std\out());
$telemetry->readProjectNameFromComposerJson(__DIR__ . '/composer.json');
$runner->addReport($telemetry);
if (getenv('TRAVIS'))
{
$travisReport = new reports\realtime\cli\travis();
$travisReport->addWriter(new std\out());
$runner->addReport($travisReport);
}
// logo, because I like it!
$report->addField(new logo());