This commit is contained in:
Eloy Lafuente (stronk7)
2021-11-04 12:52:38 +01:00
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -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);
+2 -2
View File
@@ -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 = [];
}
}