-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.atoum.php
29 lines (25 loc) · 924 Bytes
/
.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
<?php
use mageekguy\atoum\reports;
use mageekguy\atoum\reports\coverage;
use mageekguy\atoum\writers\std;
if(getenv('TRAVIS') != false) {
$coveralls = new reports\asynchronous\coveralls('src', getenv('COVERALLS_REPO_TOKEN'));
$defaultFinder = $coveralls->getBranchFinder();
$coveralls
->setBranchFinder(function () use ($defaultFinder) {
if (($branch = getenv('TRAVIS_BRANCH')) === false) {
$branch = $defaultFinder();
}
return $branch;
})
->setServiceName(getenv('TRAVIS') ? 'travis-ci' : null)
->setServiceJobId(getenv('TRAVIS_JOB_ID') ?: null)
->addDefaultWriter();
$runner->addReport($coveralls);
} else {
$coverage = new coverage\html();
$coverage->addWriter(new std\out());
$coverage->setOutPutDirectory(__DIR__ . '/coverage');
$runner->addReport($coverage);
}
$script->addDefaultReport();