-
Notifications
You must be signed in to change notification settings - Fork 0
/
.atoum.php
60 lines (39 loc) · 2.24 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/*
This file will automatically be included before EACH run.
Use it to configure atoum or anything that needs to be done before EACH run.
More information on documentation:
[en] http://docs.atoum.org/en/chapter3.html#Configuration-files
[fr] http://docs.atoum.org/fr/chapter3.html#Fichier-de-configuration
*/
use \mageekguy\atoum;
$report = $script->addDefaultReport();
// This will add the atoum logo before each run.
//$report->addField(new atoum\report\fields\runner\atoum\logo());
// This will add a green or red logo after each run depending on its status.
$report->addField(new atoum\report\fields\runner\result\logo());
// Please replace in next line "Project Name" by your project name and "/path/to/destination/directory" by your destination directory path for html files.
if (!is_dir(__DIR__ . '/../coverage')) {
mkdir(__DIR__ . '/../coverage');
}
$coverageField = new atoum\report\fields\runner\coverage\html('Polinome\Trieur', __DIR__ . '/../coverage');
// Please replace in next line http://url/of/web/site by the root url of your code coverage web site.
//$coverageField->setRootUrl('http://url/of/web/site');
$report->addField($coverageField);
// Chargement du fichier bootstrap
$runner->setBootstrapFile(dirname(__FILE__) . '/.bootstrap.atoum.php');
/*
TEST GENERATOR SETUP
$testGenerator = new atoum\test\generator();
// Please replace in next line "/path/to/your/tests/units/classes/directory" by your unit test's directory.
$testGenerator->setTestClassesDirectory('path/to/your/tests/units/classes/directory');
// Please replace in next line "your\project\namespace\tests\units" by your unit test's namespace.
$testGenerator->setTestClassNamespace('your\project\namespace\tests\units');
// Please replace in next line "/path/to/your/classes/directory" by your classes directory.
$testGenerator->setTestedClassesDirectory('path/to/your/classes/directory');
// Please replace in next line "your\project\namespace" by your project namespace.
$testGenerator->setTestedClassNamespace('your\project\namespace');
// Please replace in next line "path/to/your/tests/units/runner.php" by path to your unit test's runner.
$testGenerator->setRunnerPath('path/to/your/tests/units/runner.php');
$script->getRunner()->setTestGenerator($testGenerator);
*/