MDL-72329 competency: Fix contextid comparison

This commit is contained in:
David Matamoros 2021-09-14 14:25:07 +02:00
parent ab4d4b4724
commit 306b070ac1

View File

@ -185,7 +185,7 @@ class core_competency_api_testcase extends advanced_testcase {
// Trying to change the context.
$this->expectException(coding_exception::class);
api::update_template((object) array('id' => $template->get('id'), 'contextid' => context_coursecat::instance($cat->id)));
api::update_template((object) ['id' => $template->get('id'), 'contextid' => context_coursecat::instance($cat->id)->id]);
}
/**