MDL-70110 mod_assign: make phpunit test DB order agnostic

This commit is contained in:
Sara Arjona 2021-05-06 19:05:25 +02:00
parent 076116e7a6
commit 71996ef16b

View File

@ -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);
}
}
/**