MDL-60342 test: Reset user agent after tests
- Add a test that proves this useragent is not being reset after a test - Reset user agent
This commit is contained in:
@@ -278,6 +278,9 @@ class phpunit_util extends testing_util {
|
||||
// Reset the log manager cache.
|
||||
get_log_manager(true);
|
||||
|
||||
// Reset user agent.
|
||||
core_useragent::instance(true, null);
|
||||
|
||||
// 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()');
|
||||
|
||||
Reference in New Issue
Block a user