MDL-82281 quiz: Amend test to circumvent modinfo cache fails.

This commit is contained in:
Luca Bösch
2025-12-07 20:10:59 +01:00
parent a5b3ac7e43
commit 580ab8704e
+5
View File
@@ -243,6 +243,11 @@ final class external_test extends externallib_advanced_testcase {
break;
}
}
// Clear static cache and call get_fast_modinfo() again so that in the following cache should not be rebuilt.
\course_modinfo::clear_instance_cache();
get_fast_modinfo($record->course);
$enrol->enrol_user($instance2, $this->student->id, $this->studentrole->id);
self::setUser($this->student);