From 70bb1b7d0a8b0a8819fabd82b7e92d4623d1ebcc 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 91cafae780c..f5fb6cf4445 100644 --- a/question/tests/backup_test.php +++ b/question/tests/backup_test.php @@ -88,7 +88,8 @@ class core_question_backup_testcase 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();