From 383848344c61b7da1e4357f6c4eba0701e02e4ed Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Thu, 6 May 2021 19:05:25 +0200 Subject: [PATCH] MDL-70110 mod_assign: make phpunit test DB order agnostic --- mod/assign/tests/externallib_test.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mod/assign/tests/externallib_test.php b/mod/assign/tests/externallib_test.php index d735c04cbbe..866b8e0ce74 100644 --- a/mod/assign/tests/externallib_test.php +++ b/mod/assign/tests/externallib_test.php @@ -575,9 +575,10 @@ class mod_assign_external_testcase extends externallib_advanced_testcase { $this->assertEquals($assignmodule->id, $assignment['assignmentid']); $this->assertEquals(2, count($assignment['submissions'])); - [$submission1, $submission2] = $assignment['submissions']; - $this->assertEquals("Group 1, Submission 1", $submission1['plugins'][0]['editorfields'][0]['text']); - $this->assertEquals("Group 2, Submission 2", $submission2['plugins'][0]['editorfields'][0]['text']); + $expectedsubmissions = ['Group 1, Submission 1', 'Group 2, Submission 2']; + foreach ($assignment['submissions'] as $submission) { + $this->assertContains($submission['plugins'][0]['editorfields'][0]['text'], $expectedsubmissions); + } } /** -- 2.11.4.GIT