* actual testing of the tdo createSQL method
[vsc.git] / run-tests.php
blob86269034b093383fc4baf559448a75ebd77eafe6
1 #!/usr/bin/php
2 <?php
3 include ('_tests/config.inc.php');
4 include ('vsc.inc.php');
6 set_error_handler('exceptions_error_handler');
8 try {
9 import ('imported/simpletest');
10 require_once ('unit_tester.php');
11 require_once ('mock_objects.php');
12 require_once ('collector.php');
13 require_once ('default_reporter.php');
14 } catch (tsExceptionPackageImport $e) {
15 // problems with the simpletest imported package
16 echo $e->getMessage() . "\n";
19 try {
20 usingPackage ('tests');
21 $result = tsUnitTest::execute ($_SERVER['argc'], $_SERVER['argv']);
22 } catch (tsExceptionPackageImport $e) {
23 // could not import the tests package
24 echo $e->getMessage() . "\n";
25 echo $e->getFile() . ' - ' .$e->getLine () ."\n";
26 echo $e->getTraceAsString();
27 exit (1);
28 } catch (tsExceptionAutoload $e) {
29 // could not load the tsUnitTest class
30 echo $e->getMessage() . "\n";
31 exit (1);
34 if (SimpleReporter::inCli()) {
35 exit ($result ? 0 : 1);