aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/suite.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/tests/suite.php')
-rwxr-xr-xengine/tests/suite.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/tests/suite.php b/engine/tests/suite.php
index 729958527..dbe88065a 100755
--- a/engine/tests/suite.php
+++ b/engine/tests/suite.php
@@ -11,9 +11,6 @@
require_once(dirname( __FILE__ ) . '/../start.php');
-// Ensure that only logged-in users can see this page
-gatekeeper();
-
$vendor_path = "$CONFIG->path/vendors/simpletest";
$test_path = "$CONFIG->path/engine/tests";
@@ -35,9 +32,14 @@ if ($CONFIG->debug > 0) {
if (TextReporter::inCli()) {
// In CLI error codes are returned.
// 0 is success.
+ elgg_set_ignore_access(TRUE);
exit ($suite->Run(new TextReporter()) ? 0 : 1 );
}
+ // Ensure that only logged-in users can see this page
+ admin_gatekeeper();
+ $old = elgg_set_ignore_access(TRUE);
$suite->Run(new HtmlReporter());
+ elgg_set_ignore_access($old);
} else {
// @todo display an error?
exit (1);