-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.atoum_db.php
More file actions
30 lines (25 loc) · 813 Bytes
/
.atoum_db.php
File metadata and controls
30 lines (25 loc) · 813 Bytes
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
<?php
$runner->disableCodeCoverage();
$runner->addTestsFromDirectory(__DIR__ . '/tests/units_db');
## Notifier (growlnotify)
$images = __DIR__ . '/vendor/atoum/atoum/resources/images/logo';
$report = $script->AddDefaultReport();
if(syslibExist('growlnotify') )
{
$notifier = new \mageekguy\atoum\report\fields\runner\result\notifier\image\growl();
$notifier
->setSuccessImage($images . DIRECTORY_SEPARATOR . 'success.png')
->setFailureImage($images . DIRECTORY_SEPARATOR . 'failure.png')
;
$report->addField($notifier, array(atoum\runner::runStop));
}
/**
* Return true if library is available on system
*
* @param string $libName
* @return boolean
*/
function syslibExist($libName)
{
return !is_null(shell_exec(sprintf('command -v %s 2>/dev/null', $libName)));
}