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