diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 21:54:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 21:54:05 +0000 |
commit | 3ed9bad2b1dbf5364febbb2c84ae4b6a631dc4b6 (patch) | |
tree | a7c50bc37c6a56804d9c04c6eaf054a86dd33c38 /engine/tests/suite.php | |
parent | d6c85011e4e5b65997732489f3ed8bc602909556 (diff) | |
download | elgg-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/suite.php')
-rwxr-xr-x | engine/tests/suite.php | 8 |
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); |