summaryrefslogtreecommitdiff
path: root/demos/sqlmap-sample/tests/run_tests.php
diff options
context:
space:
mode:
authorwei <>2006-04-14 06:22:09 +0000
committerwei <>2006-04-14 06:22:09 +0000
commit3d3f8d3832921f99daf8ce1953304763c2e76c62 (patch)
treee1b0a9bc3a13fccd253770fb452ac96cc6315121 /demos/sqlmap-sample/tests/run_tests.php
parent373d8acc503b94ea09823f49e2ab5e395eccc584 (diff)
Importing SQLMap + sample + docs.
Diffstat (limited to 'demos/sqlmap-sample/tests/run_tests.php')
-rw-r--r--demos/sqlmap-sample/tests/run_tests.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/demos/sqlmap-sample/tests/run_tests.php b/demos/sqlmap-sample/tests/run_tests.php
new file mode 100644
index 00000000..843d0a79
--- /dev/null
+++ b/demos/sqlmap-sample/tests/run_tests.php
@@ -0,0 +1,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);
+
+
+?> \ No newline at end of file