Commit 620fface authored by jun's avatar jun
Browse files

MDL-57658 calendar: Set sort order for fetched DB records

parent 7f2d58bf
......@@ -463,7 +463,7 @@ class core_calendar_rrule_manager_testcase extends advanced_testcase {
$mang = new rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$records = $DB->get_records('event', array('repeatid' => $this->event->id));
$records = $DB->get_records('event', array('repeatid' => $this->event->id), 'timestart ASC');
$expecteddate = clone($startdatetime);
foreach ($records as $record) {
......@@ -584,7 +584,7 @@ class core_calendar_rrule_manager_testcase extends advanced_testcase {
$mang = new rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$records = $DB->get_records('event', array('repeatid' => $this->event->id));
$records = $DB->get_records('event', array('repeatid' => $this->event->id), 'timestart ASC');
$this->assertCount(3, $records);
$expecteddate = clone($startdatetime);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment