Skip to content

Commit

Permalink
MDL-76870 question: change assertion to assertEqualsCanonicalizing
Browse files Browse the repository at this point in the history
By using that assertion the arrays will be sorted before comparison
preventing any Oracle sorting related failures.

Credits for the solution go to Tim Hunt!
  • Loading branch information
lameze committed Jan 13, 2023
1 parent b8b905c commit bb0aeaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion question/tests/backup_test.php
Expand Up @@ -83,7 +83,8 @@ protected function restore_course($backupid, $fullname, $shortname, $categoryid,
$this->assertTrue($precheck);
} else {
$precheckresults = $rc->get_precheck_results();
$this->assertEquals(['warnings' => $expectedprecheckwarning], $precheckresults);
$this->assertEqualsCanonicalizing($expectedprecheckwarning, $precheckresults['warnings']);
$this->assertCount(1, $precheckresults);
}
$rc->execute_plan();
$rc->destroy();
Expand Down

0 comments on commit bb0aeaf

Please sign in to comment.