From a61b62e592380fa3be7e4ff812f3e514afabd321 Mon Sep 17 00:00:00 2001 From: nickw Date: Fri, 16 Oct 2009 22:53:22 +0000 Subject: Rewriting core debug messages to be more informative. Introducing the concept of levels for Elgg debugging: notices, warnings and errors are displayed when the appropriate debugging level is enabled. An additional level of "debug" exists to differentiate from errors. git-svn-id: http://code.elgg.org/elgg/trunk@3560 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/tests/suite.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'engine/tests') 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); -- cgit v1.2.3