mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
unit tests: MDL-20398 spurious exceptions when $CFG->debugdisplay is false
Doh! I had the logic the wrong way round in my previous commit. Sorry.
This commit is contained in:
parent
4f19b365b8
commit
477082146b
@ -3151,7 +3151,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
|
||||
$backtrace = debug_backtrace();
|
||||
}
|
||||
$from = format_backtrace($backtrace, CLI_SCRIPT);
|
||||
if ($CFG->debugdisplay || empty($UNITTEST->running)) {
|
||||
if ($CFG->debugdisplay || isset($UNITTEST->running)) {
|
||||
// When the unit tests are running, any call to trigger_error
|
||||
// is intercepted by the test framework and reported as an exception.
|
||||
// Therefore, we cannot use trigger_error during unit tests.
|
||||
|
Loading…
x
Reference in New Issue
Block a user