-
Notifications
You must be signed in to change notification settings - Fork 4
/
.atoum.php
36 lines (24 loc) · 997 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
30
31
32
33
34
35
<?php
use mageekguy\atoum;
define('CODE_COVERAGE_ROOT', __DIR__ . DIRECTORY_SEPARATOR . 'tests/coverage');
$report = $script->addDefaultReport();
if (!file_exists(CODE_COVERAGE_ROOT) && !@mkdir(CODE_COVERAGE_ROOT)) {
die('Unable to create directory "' . CODE_COVERAGE_ROOT . '".');
}
$coverageField = new atoum\report\fields\runner\coverage\html(
basename(__DIR__),
CODE_COVERAGE_ROOT
);
$coverageField->setRootUrl('file://' . CODE_COVERAGE_ROOT);
$report->addField($coverageField);
$script->noCodeCoverageForNamespaces('atoum');
$runner->addTestsFromDirectory(__DIR__ . '/tests');
$runner->setBootstrapFile(__DIR__ . '/.bootstrap.php');
require __DIR__ . '/source/Skeleton/xunit.php';
$report = new skeleton\xunit;
$report->addWriter(new atoum\writers\file('./xunit.xml'));
$runner->addReport($report);
require __DIR__ . '/source/Skeleton/clover.php';
$report = new skeleton\clover;
$report->addWriter(new atoum\writers\file('./clover.xml'));
$runner->addReport($report);