forked from atoum/AtoumBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.atoum.php
32 lines (26 loc) · 801 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
<?php
use \mageekguy\atoum;
define('TEST_ROOT', __DIR__ . DIRECTORY_SEPARATOR . 'tests');
function colorized() {
$color = -1;
if(false !== ($term = getenv('TERM'))) {
if(preg_match('/\d+/', $term, $matches) > 0) {
$color = $matches[0];
}
}
if($color < 0) {
$color = system('tput colors 2> /dev/null');
}
return ($color >= 256);
}
if(colorized())
{
$script
->addDefaultReport()
->addField(new atoum\report\fields\runner\atoum\logo())
->addField(new atoum\report\fields\runner\result\logo())
;
}
$script->noCodeCoverageForNamespaces('mageekguy');
$script->bootstrapFile(TEST_ROOT . DIRECTORY_SEPARATOR . 'bootstrap.php');
$runner->addTestsFromDirectory(TEST_ROOT . DIRECTORY_SEPARATOR . 'units');