mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 03:52:16 +02:00
Merge branch 'MDL-72987' of https://github.com/paulholden/moodle
This commit is contained in:
commit
7faf678b59
@ -414,6 +414,8 @@ class behat_util extends testing_util {
|
||||
|
||||
filter_manager::reset_caches();
|
||||
|
||||
\core_reportbuilder\manager::reset_caches();
|
||||
|
||||
// Reset course and module caches.
|
||||
core_courseformat\base::reset_course_cache(0);
|
||||
get_fast_modinfo(0, 0, true);
|
||||
|
@ -67,10 +67,10 @@ class manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Run reset code after unit tests to reset the instance cache
|
||||
* Run reset code after tests to reset the instance cache
|
||||
*/
|
||||
public static function reset_caches(): void {
|
||||
if (PHPUNIT_TEST) {
|
||||
if (PHPUNIT_TEST || defined('BEHAT_TEST')) {
|
||||
static::$instances = [];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user