Skip to content

Commit 5eba19b

Browse files
committed
fixup! adjust tests
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent 38e51fe commit 5eba19b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/Unit/Service/SubmissionServiceTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ public function testGetSubmissions() {
163163
->with(5)
164164
->willReturn([$submission_1, $submission_2]);
165165

166+
$this->submissionMapper->expects($this->once())
167+
->method('findByFormAndUser')
168+
->with(5, 'someOtherUser')
169+
->willReturn([$submission_2]);
170+
166171
$this->answerMapper->expects($this->any())
167172
->method('findBySubmission')
168173
->will($this->returnValueMap([
@@ -202,7 +207,10 @@ public function testGetSubmissions() {
202207
]
203208
];
204209

210+
// All submissions
205211
$this->assertEquals($expected, $this->submissionService->getSubmissions(5));
212+
// Only submissions for a single user
213+
$this->assertEquals([$expected[1]], $this->submissionService->getSubmissions(5, 'someOtherUser'));
206214
}
207215

208216
public function dataWriteFileToCloud() {

0 commit comments

Comments
 (0)