From 322bb9cd2be9e51422cb2b82684692e825c2bfb7 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 2 Oct 2009 18:40:04 +0000 Subject: Added simpletest and start of unit tests. git-svn-id: http://code.elgg.org/elgg/trunk@3503 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/tests/elgg_unit_test.php | 13 +++++++++++++ engine/tests/suite.php | 30 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 engine/tests/elgg_unit_test.php create mode 100755 engine/tests/suite.php (limited to 'engine/tests') diff --git a/engine/tests/elgg_unit_test.php b/engine/tests/elgg_unit_test.php new file mode 100755 index 000000000..79c3d375c --- /dev/null +++ b/engine/tests/elgg_unit_test.php @@ -0,0 +1,13 @@ +path/vendors/simpletest"; +$test_path = "$CONFIG->path/engine/tests"; + +require_once( "$vendor_path/unit_tester.php" ); +require_once( "$vendor_path/mock_objects.php" ); +require_once( "$vendor_path/reporter.php" ); +require_once( "$test_path/elgg_unit_test.php" ); + +$suite = new TestSuite( 'Elgg Core Unit Tests' ); + +if (!$CONFIG->debug) { + if ( TextReporter::inCli() ) + { + exit( $suite->Run( new TextReporter() ) ? 0 : 1 ); + } + $suite->Run( new HtmlReporter() ); +} -- cgit v1.2.3