Skip to content

Commit

Permalink
MDL-65201 backup: amend tests to apply for the final agreed criteria
Browse files Browse the repository at this point in the history
backup nextstarttime ASC
course timemodified DESC
  • Loading branch information
stronk7 committed Jun 6, 2019
1 parent bcd4862 commit 11cdea3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backup/util/helper/tests/cronhelper_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private function course_setup() {
global $DB;

// Create test courses.
$course1 = $this->getDataGenerator()->create_course(array('timecreated' => 1551402000));
$course1 = $this->getDataGenerator()->create_course(array('timecreated' => 1553402000)); // Newest.
$course2 = $this->getDataGenerator()->create_course(array('timecreated' => 1552179600));
$course3 = $this->getDataGenerator()->create_course(array('timecreated' => 1552179600));
$course4 = $this->getDataGenerator()->create_course(array('timecreated' => 1552179600));
Expand Down Expand Up @@ -417,10 +417,10 @@ public function test_get_courses() {
}
$courseset->close();

// First should be course 1, it is the oldest modified without a backup.
// First should be course 1, it is the more recently modified without a backup.
$this->assertEquals($course1->id, $coursearray[0]);

// Second should be course 2, it is the next oldest modified without a backup.
// Second should be course 2, it is the next more recently modified without a backup.
$this->assertEquals($course2->id, $coursearray[1]);

// Third should be course 3, it is the course with the oldest backup.
Expand Down Expand Up @@ -454,10 +454,10 @@ public function test_get_courses_starttime() {
$courseset->close();

// Should only be two courses.
// First should be course 1, it is the oldest modified without a backup.
// First should be course 1, it is the more recently modified without a backup.
$this->assertEquals($course1->id, $coursearray[0]);

// Second should be course 2, it is the next oldest modified without a backup.
// Second should be course 2, it is the next more recently modified without a backup.
$this->assertEquals($course2->id, $coursearray[1]);
}

Expand Down

0 comments on commit 11cdea3

Please sign in to comment.