summaryrefslogtreecommitdiff
path: root/demos/sqlmap-sample/tests/run_tests.php
blob: 843d0a79271c2cb58541feb50df44152e21e7f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

//define simple test location
define('SIMPLE_TEST', realpath('../../../tests/UnitTests/simpletest'));

//define prado framework location
define('PRADO', realpath('../../../framework'));

//define directory that contains business objects
define('MY_MODELS', realpath('../protected/business-objects'));

require_once(SIMPLE_TEST.'/unit_tester.php');
require_once(SIMPLE_TEST.'/reporter.php');
require_once(PRADO.'/prado.php');
require_once(MY_MODELS.'/Person.php');

//supress strict warnings 
error_reporting(E_ALL);

//import Data mapper
Prado::using('System.DataAccess.SQLMap.TMapper');

//Add tests
$test = new GroupTest('SQLMap Tutorial tests');
$test->addTestFile('PersonTest.php');
if(SimpleReporter::inCli())
	$reporter = new TextReporter();
else
	$reporter = new HtmlReporter();
$test->run($reporter);


?>