MDL-58911 calendar: use the same callbacks in unittests and prod
Remove unittest-specific callbacks for checking access and displaying the calendar events on the dashboard. This will allow plugin developers unittest the full behavior of how their plugins add events to the dashboard. Reset all static caches between unittests.
This commit is contained in:
@@ -229,6 +229,11 @@ class phpunit_util extends testing_util {
|
||||
// Reset internal users.
|
||||
core_user::reset_internal_users();
|
||||
|
||||
// Clear static caches in calendar container.
|
||||
if (class_exists('\core_calendar\local\event\container', false)) {
|
||||
core_calendar\local\event\container::reset_caches();
|
||||
}
|
||||
|
||||
//TODO MDL-25290: add more resets here and probably refactor them to new core function
|
||||
|
||||
// Reset course and module caches.
|
||||
|
||||
Reference in New Issue
Block a user