Skip to content

Commit

Permalink
Merge branch 'wip-MDL-59441-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
dmonllao committed Jul 11, 2017
2 parents 58fcd0a + 5540c09 commit 93f2056
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion calendar/tests/container_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,13 @@ public function test_delete_module_delete_events() {
$group = $this->getDataGenerator()->create_group(['courseid' => $course->id]);

foreach (core_component::get_plugin_list('mod') as $modname => $unused) {
$module = $this->getDataGenerator()->create_module($modname, ['course' => $course->id]);
try {
$generator = $this->getDataGenerator()->get_plugin_generator('mod_'.$modname);
} catch (coding_exception $e) {
// Module generator is not implemented.
continue;
}
$module = $generator->create_instance(['course' => $course->id]);

// Create bunch of events of different type (user override, group override, module event).
$this->create_event(['userid' => $user->id, 'modulename' => $modname, 'instance' => $module->id]);
Expand Down

0 comments on commit 93f2056

Please sign in to comment.