Skip to content

Commit 0a43c82

Browse files
committed
MDL-82281 quiz: Amend test to circumvent modinfo cache fails.
1 parent 1c7ac70 commit 0a43c82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mod/quiz/tests/external/external_test.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ public function test_mod_quiz_get_quizzes_by_courses(): void {
238238
break;
239239
}
240240
}
241+
242+
// Clear static cache and call get_fast_modinfo() again so that in the following cache should not be rebuilt.
243+
\course_modinfo::clear_instance_cache();
244+
$modinfo = get_fast_modinfo($record->course);
245+
241246
$enrol->enrol_user($instance2, $this->student->id, $this->studentrole->id);
242247

243248
self::setUser($this->student);

0 commit comments

Comments
 (0)