From bb0aeafb259285aac956d7a9aaedc62867d3c84b Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 12 Jan 2023 17:12:18 +0800 Subject: [PATCH] MDL-76870 question: change assertion to assertEqualsCanonicalizing 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! --- question/tests/backup_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/tests/backup_test.php b/question/tests/backup_test.php index 2f54ee10e1e..e7d954efd76 100644 --- a/question/tests/backup_test.php +++ b/question/tests/backup_test.php @@ -83,7 +83,8 @@ class backup_test extends \advanced_testcase { $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();