* changes to the tests to reflect the new ORM stack
[vsc.git] / run-tests.php
blob97ab73580dc90da00cd73a44c2f98fd237f44d65
1 #!/usr/bin/php
2 <?php
3 require_once ('./_tests/config.inc.php');
4 require_once ('./_res/config.inc.php');
5 require_once ('functions.inc.php');
7 try {
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 'bu';
18 try {
19 import ('tests');
20 $result = tsUnitTest::execute ($_SERVER['argc'], $_SERVER['argv']);
21 } catch (tsExceptionPackageImport $e) {
22 // could not import the tests package
23 echo $e->getMessage();
24 exit (1);
25 } catch (tsExceptionAutoload $e) {
26 // could not load the tsUnitTest class
27 echo $e->getMessage();
28 exit (1);
31 if (SimpleReporter::inCli()) {
32 exit ($result ? 0 : 1);