- Add test folder
[xhtml-compiler.git] / tests / index.php
blobef75224fc895016b0231394182850d26b786f30c
1 <?php
3 // call one file using /?f=FileTest.php , see $test_files array for
4 // valid values
6 error_reporting(E_ALL | E_STRICT);
7 define('XHTMLCompilerTest', 1);
9 $simpletest_location = 'simpletest/'; // reasonable guess
11 // load SimpleTest
12 @include '../config-test.php'; // don't mind if it isn't there
13 require_once $simpletest_location . 'unit_tester.php';
14 require_once $simpletest_location . 'reporter.php';
15 require_once $simpletest_location . 'mock_objects.php';
17 // load our libraries
18 require_once '../common.php';
19 chdir('tests');
20 Mock::generate('XHTMLCompiler', 'XHTMLCompilerMock');
22 $test = new GroupTest('All Tests - XHTML Compiler');
24 $test->addTestFile('functions-test.php');
26 if (SimpleReporter::inCli()) $reporter = new TextReporter();
27 else $reporter = new HTMLReporter('UTF-8');
29 $test->run($reporter);