File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 () {
You can’t perform that action at this time.
0 commit comments