mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-70110 mod_assign: make phpunit test DB order agnostic
This commit is contained in:
parent
076116e7a6
commit
71996ef16b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user