diff options
Diffstat (limited to 'engine/tests')
-rwxr-xr-x | engine/tests/suite.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/tests/suite.php b/engine/tests/suite.php index 01056a218..c3de185ff 100755 --- a/engine/tests/suite.php +++ b/engine/tests/suite.php @@ -28,19 +28,19 @@ foreach ($test_files as $file) { } // Only run tests in debug mode. -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 { +if (!isset($CONFIG->debug)) { // @todo display an error? exit (1); } + +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); |