99use App \RemoteSite \Responses \FinalizeUpdate ;
1010use App \RemoteSite \Responses \GetUpdate ;
1111use App \RemoteSite \Responses \HealthCheck ;
12+ use App \RemoteSite \Responses \Notification ;
1213use App \RemoteSite \Responses \PrepareUpdate ;
1314use Illuminate \Database \Eloquent \Relations \HasMany ;
1415use Illuminate \Support \Facades \App ;
@@ -147,7 +148,8 @@ public function testJobWritesFailLogOnFailing()
147148 'checkHealth ' => $ this ->getHealthCheckMock (),
148149 'getUpdate ' => $ this ->getGetUpdateMock ("1.0.1 " ),
149150 'prepareUpdate ' => $ this ->getPrepareUpdateMock (),
150- 'finalizeUpdate ' => $ this ->getFinalizeUpdateMock (false )
151+ 'finalizeUpdate ' => $ this ->getFinalizeUpdateMock (false ),
152+ 'notificationFailed ' => $ this ->getNotificationMock (true )
151153 ],
152154 [
153155 'result ' => false ,
@@ -169,7 +171,8 @@ public function testJobWritesSuccessLogForSuccessfulJobs()
169171 'checkHealth ' => $ this ->getHealthCheckMock (),
170172 'getUpdate ' => $ this ->getGetUpdateMock ("1.0.1 " ),
171173 'prepareUpdate ' => $ this ->getPrepareUpdateMock (),
172- 'finalizeUpdate ' => $ this ->getFinalizeUpdateMock (true )
174+ 'finalizeUpdate ' => $ this ->getFinalizeUpdateMock (true ),
175+ 'notificationSuccess ' => $ this ->getNotificationMock (true )
173176 ],
174177 [
175178 'result ' => true ,
@@ -261,6 +264,13 @@ protected function getFinalizeUpdateMock(bool $success)
261264 ]);
262265 }
263266
267+ protected function getNotificationMock (bool $ success )
268+ {
269+ return Notification::from ([
270+ "success " => $ success
271+ ]);
272+ }
273+
264274 protected function getPrepareUpdateMock ($ overrides = [])
265275 {
266276 $ defaults = [
0 commit comments