|
Revision 50, 0.6 kB
(checked in by mikey, 2 years ago)
|
created infrastructure for unit tests
added unit test for definitions.AttributeDefinition?
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
require_once '../simpletest/reporter.php'; |
|---|
| 8 |
require_once '../XJConf/XJConfLoader.php'; |
|---|
| 9 |
require_once 'definitions/DefinitionsTestSuite.php'; |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
class XJConfTestRunner |
|---|
| 17 |
{ |
|---|
| 18 |
public function main() |
|---|
| 19 |
{ |
|---|
| 20 |
$test = new DefinitionsTestSuite(); |
|---|
| 21 |
if (PHP_SAPI == 'cli') { |
|---|
| 22 |
$reporter = new TextReporter(); |
|---|
| 23 |
} else { |
|---|
| 24 |
$reporter = new HtmlReporter(); |
|---|
| 25 |
} |
|---|
| 26 |
$test->run($reporter); |
|---|
| 27 |
} |
|---|
| 28 |
} |
|---|
| 29 |
XJConfTestRunner::main(); |
|---|
| 30 |
?> |
|---|