mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-54751 core_course: Fixed event type checks in adhoc deletion tests
This commit is contained in:
parent
3e85e02a98
commit
89e20c74d5
@ -3582,7 +3582,8 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$count = 0;
|
||||
while (!empty($events)) {
|
||||
$event = array_pop($events);
|
||||
if (in_array($event->objectid, [$assign0->cmid, $assign1->cmid, $assign2->cmid])) {
|
||||
if ($event instanceof \core\event\course_module_deleted &&
|
||||
in_array($event->objectid, [$assign0->cmid, $assign1->cmid, $assign2->cmid])) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
@ -3657,7 +3658,8 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$count = 0;
|
||||
while (!empty($events)) {
|
||||
$event = array_pop($events);
|
||||
if (in_array($event->objectid, [$assign0->cmid, $assign1->cmid])) {
|
||||
if ($event instanceof \core\event\course_module_deleted &&
|
||||
in_array($event->objectid, [$assign0->cmid, $assign1->cmid])) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user