Make svn_log_limit more resilient against empty cache entries.
[xhtml-compiler.git] / tests / index.php
blob6cdd986ee475b5aad2ae0760a5081758fde0cf0b
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 if(file_exists($f = '../conf/config-test.php')) include $f;
13 if(file_exists($f = '../config-test.php')) include $f;
14 require_once $simpletest_location . 'unit_tester.php';
15 require_once $simpletest_location . 'reporter.php';
16 require_once $simpletest_location . 'mock_objects.php';
18 // note we are using a specially modded version of SimpleTest with strict
19 // support as well as a backported fix in exceptions.php that
20 // ensures tearDown gets called
22 // load our libraries
23 require_once '../common.php';
24 chdir('xhtml-compiler/tests');
25 Mock::generate('XHTMLCompiler', 'XHTMLCompilerMock');
26 Mock::generate('XHTMLCompiler_PHP', 'XHTMLCompiler_PHPMock');
27 Mock::generate('XHTMLCompiler_DOMFilter', 'XHTMLCompiler_DOMFilterMock');
28 Mock::generate('XHTMLCompiler_TextFilter', 'XHTMLCompiler_TextFilterMock');
29 Mock::generate('XHTMLCompiler_Page', 'XHTMLCompiler_PageMock');
31 require_once 'XHTMLCompilerHarness.php';
32 require_once 'XHTMLCompiler/FileSystemHarness.php';
34 $test = new GroupTest('All Tests - XHTML Compiler');
36 $test->addTestFile('XHTMLCompiler/FunctionsTest.php');
37 $test->addTestFile('XHTMLCompiler/PageTest.php');
38 $test->addTestFile('XHTMLCompiler/ExceptionTest.php');
39 $test->addTestFile('XHTMLCompiler/FilterManagerTest.php');
40 $test->addTestFile('XHTMLCompiler/DirectoryTest.php');
42 //if (isset($_GET['full'])) {
43 // these are expensive unit tests
44 $test->addTestFile('XHTMLCompiler/FileTest.php');
45 //}
47 if (SimpleReporter::inCli()) $reporter = new TextReporter();
48 else $reporter = new HTMLReporter('UTF-8');
50 $test->run($reporter);