aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/suite.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/tests/suite.php')
-rwxr-xr-xengine/tests/suite.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/engine/tests/suite.php b/engine/tests/suite.php
new file mode 100755
index 000000000..5eed796ac
--- /dev/null
+++ b/engine/tests/suite.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Runs unit tests.
+ *
+ * @package Elgg
+ * @subpackage Test
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+
+require_once( dirname( __FILE__ ) . '/../start.php' );
+
+$vendor_path = "$CONFIG->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() );
+}