3 include ('vsc.inc.php');
5 set_error_handler('exceptions_error_handler');
6 include ('_tests/config.inc.php');
8 import ('imported/simpletest');
9 require_once ('unit_tester.php');
10 require_once ('mock_objects.php');
11 require_once ('collector.php');
12 require_once ('default_reporter.php');
13 } catch (tsExceptionPackageImport
$e) {
14 // problems with the simpletest imported package
15 echo $e->getMessage() . "\n";
19 usingPackage ('tests');
20 $result = tsUnitTest
::execute ($_SERVER['argc'], $_SERVER['argv']);
21 } catch (tsExceptionPackageImport
$e) {
22 // could not import the tests package
23 echo $e->getMessage() . "\n";
24 echo $e->getFile() . ' - ' .$e->getLine () ."\n";
25 echo $e->getTraceAsString();
27 } catch (tsExceptionAutoload
$e) {
28 // could not load the tsUnitTest class
29 echo $e->getMessage() . "\n";
33 if (SimpleReporter
::inCli()) {
34 exit ($result ?
0 : 1);