| 1 | #!/usr/bin/php4 -Cq |
| 2 | <?php |
| 3 | |
| 4 | $testfiles = array( |
| 5 | // For your own good, don't move these first two test suites |
| 6 | 'InternalTest' => array('InternalTest'), |
| 7 | 'DBTest' => array('DBInitialTest', |
| 8 | 'DiogenesDatabaseTest'), |
| 9 | 'DiogenesLoggerViewTest' => array('DiogenesLoggerViewTest') |
| 10 | ); |
| 11 | |
| 12 | global $TESTING; |
| 13 | $TESTING=true; |
| 14 | chdir('..'); |
| 15 | |
| 16 | error_reporting(E_ALL); |
| 17 | ini_set('include_path', 'include:testing:'.ini_get('include_path')); |
| 18 | |
| 19 | require_once 'PHPUnit.php'; |
| 20 | |
| 21 | foreach ($testfiles as $file => $tests) |
| 22 | { |
| 23 | require_once "$file.php"; |
| 24 | |
| 25 | echo "Now running tests from $file.php...\n"; |
| 26 | |
| 27 | $suite = new PHPUnit_TestSuite(); |
| 28 | |
| 29 | foreach ($tests as $test) |
| 30 | { |
| 31 | $suite->addTestSuite($test); |
| 32 | } |
| 33 | |
| 34 | $result = PHPUnit::run($suite); |
| 35 | |
| 36 | echo $result->toString(); |
| 37 | } |
| 38 | |
| 39 | echo "All Tests Complete\n"; |