Merge branch 'MDL-69256-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2021-04-20 00:04:48 +02:00
commit ea2fd1ace6

View File

@ -114,10 +114,12 @@ class core_completion_cron_task_testcase extends advanced_testcase {
// Get s1's completion record from c1.
$s1c1 = $DB->get_record('course_completions', ['userid' => $s1->id, 'course' => $c1->id]);
$this->assertEquals(userdate($now), userdate($s1c1->timeenrolled));
$this->assertGreaterThanOrEqual($now, $s1c1->timeenrolled);
$this->assertLessThanOrEqual(time(), $s1c1->timeenrolled);
// Get s2's completion record from c1.
$s2c1 = $DB->get_record('course_completions', ['userid' => $s2->id, 'course' => $c1->id]);
$this->assertEquals(userdate($now), userdate($s2c1->timeenrolled));
$this->assertGreaterThanOrEqual($now, $s2c1->timeenrolled);
$this->assertLessThanOrEqual(time(), $s2c1->timeenrolled);
}
}