| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
require_once dirname(__FILE__) . '/../simpletest/unit_tester.php'; |
|---|
| 8 |
require_once dirname(__FILE__) . '/../simpletest/mock_objects.php'; |
|---|
| 9 |
require_once dirname(__FILE__) . '/../simpletest/reporter.php'; |
|---|
| 10 |
require_once dirname(__FILE__) . '/../XJConf/XJConfLoader.php'; |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
class XJConfTestRunner |
|---|
| 18 |
{ |
|---|
| 19 |
public function main() |
|---|
| 20 |
{ |
|---|
| 21 |
$dir = dirname(__FILE__); |
|---|
| 22 |
$testSuite = new TestSuite('All tests.'); |
|---|
| 23 |
$testSuite->addTestFile($dir . '/converters/ConvertersTestSuite.php'); |
|---|
| 24 |
$testSuite->addTestFile($dir . '/definitions/DefinitionsTestSuite.php'); |
|---|
| 25 |
if (PHP_SAPI == 'cli') { |
|---|
| 26 |
$reporter = new TextReporter(); |
|---|
| 27 |
} else { |
|---|
| 28 |
$reporter = new HtmlReporter(); |
|---|
| 29 |
} |
|---|
| 30 |
$testSuite->run($reporter); |
|---|
| 31 |
} |
|---|
| 32 |
} |
|---|
| 33 |
XJConfTestRunner::main(); |
|---|
| 34 |
?> |
|---|