3 include ('_tests/config.inc.php');
4 include ('vsc.inc.php');
6 set_error_handler('exceptions_error_handler');
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";
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();
28 } catch (tsExceptionAutoload
$e) {
29 // could not load the tsUnitTest class
30 echo $e->getMessage() . "\n";
34 if (SimpleReporter
::inCli()) {
35 exit ($result ?
0 : 1);