From affe326f23cc60e76d6064bc476349554ecf1312 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 26 Aug 2016 17:14:05 +0100 Subject: [PATCH] MDL-55741 phpunit: does not reset get_log_manager cache --- lib/phpunit/classes/util.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index c146b5ca8bb..042901ac00d 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -265,6 +265,9 @@ class phpunit_util extends testing_util { // Make sure the time locale is consistent - that is Australian English. setlocale(LC_TIME, $localename); + // Reset the log manager cache. + get_log_manager(true); + // verify db writes just in case something goes wrong in reset if (self::$lastdbwrites != $DB->perf_get_writes()) { error_log('Unexpected DB writes in phpunit_util::reset_all_data()');