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:
Marina Glancy
2017-06-20 16:17:26 +08:00
parent dec00f6a53
commit 153f74956d
3 changed files with 90 additions and 98 deletions
+5
View File
@@ -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.