aboutsummaryrefslogtreecommitdiff
path: root/engine/tests
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-13 21:54:05 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-13 21:54:05 +0000
commit3ed9bad2b1dbf5364febbb2c84ae4b6a631dc4b6 (patch)
treea7c50bc37c6a56804d9c04c6eaf054a86dd33c38 /engine/tests
parentd6c85011e4e5b65997732489f3ed8bc602909556 (diff)
downloadelgg-3ed9bad2b1dbf5364febbb2c84ae4b6a631dc4b6.tar.gz
elgg-3ed9bad2b1dbf5364febbb2c84ae4b6a631dc4b6.tar.bz2
Test suite now requires admin for web-based tests.
Uses access overrides for cli-based tests. git-svn-id: http://code.elgg.org/elgg/trunk@3531 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests')
-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);