@@ -191,57 +191,31 @@ public function testGetRedirect(
191
191
$ redirectToDashboard
192
192
) {
193
193
// Preparations for method updateLastCustomerId()
194
- $ this ->customerSession ->expects ($ this ->once ())
195
- ->method ('getLastCustomerId ' )
196
- ->willReturn ($ customerId );
197
- $ this ->customerSession ->expects ($ this ->any ())
198
- ->method ('isLoggedIn ' )
199
- ->willReturn ($ customerLoggedIn );
200
- $ this ->customerSession ->expects ($ this ->any ())
201
- ->method ('getId ' )
202
- ->willReturn ($ lastCustomerId );
203
- $ this ->customerSession ->expects ($ this ->any ())
204
- ->method ('unsBeforeAuthUrl ' )
205
- ->willReturnSelf ();
194
+ $ this ->customerSession ->expects ($ this ->once ())->method ('getLastCustomerId ' )->willReturn ($ customerId );
195
+ $ this ->customerSession ->expects ($ this ->any ())->method ('isLoggedIn ' )->willReturn ($ customerLoggedIn );
196
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getId ' )->willReturn ($ lastCustomerId );
197
+ $ this ->customerSession ->expects ($ this ->any ())->method ('unsBeforeAuthUrl ' )->willReturnSelf ();
206
198
$ this ->customerSession ->expects ($ this ->any ())
207
199
->method ('setLastCustomerId ' )
208
200
->with ($ lastCustomerId )
209
201
->willReturnSelf ();
210
202
211
203
// Preparations for method prepareRedirectUrl()
212
- $ this ->store ->expects ($ this ->once ())
213
- ->method ('getBaseUrl ' )
214
- ->willReturn ($ baseUrl );
204
+ $ this ->store ->expects ($ this ->once ())->method ('getBaseUrl ' )->willReturn ($ baseUrl );
215
205
216
- $ this ->customerSession ->expects ($ this ->any ())
217
- ->method ('getBeforeAuthUrl ' )
218
- ->willReturn ($ beforeAuthUrl );
219
- $ this ->customerSession ->expects ($ this ->any ())
220
- ->method ('setBeforeAuthUrl ' )
221
- ->willReturnSelf ();
222
- $ this ->customerSession ->expects ($ this ->any ())
223
- ->method ('getAfterAuthUrl ' )
224
- ->willReturn ($ afterAuthUrl );
206
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getBeforeAuthUrl ' )->willReturn ($ beforeAuthUrl );
207
+ $ this ->customerSession ->expects ($ this ->any ())->method ('setBeforeAuthUrl ' )->willReturnSelf ();
208
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getAfterAuthUrl ' )->willReturn ($ afterAuthUrl );
225
209
$ this ->customerSession ->expects ($ this ->any ())
226
210
->method ('setAfterAuthUrl ' )
227
211
->with ($ beforeAuthUrl )
228
212
->willReturnSelf ();
229
- $ this ->customerSession ->expects ($ this ->any ())
230
- ->method ('getBeforeRequestParams ' )
231
- ->willReturn (false );
232
-
233
- $ this ->customerUrl ->expects ($ this ->any ())
234
- ->method ('getAccountUrl ' )
235
- ->willReturn ($ accountUrl );
236
- $ this ->customerUrl ->expects ($ this ->any ())
237
- ->method ('getLoginUrl ' )
238
- ->willReturn ($ loginUrl );
239
- $ this ->customerUrl ->expects ($ this ->any ())
240
- ->method ('getLogoutUrl ' )
241
- ->willReturn ($ logoutUrl );
242
- $ this ->customerUrl ->expects ($ this ->any ())
243
- ->method ('getDashboardUrl ' )
244
- ->willReturn ($ dashboardUrl );
213
+ $ this ->customerSession ->expects ($ this ->any ())->method ('getBeforeRequestParams ' )->willReturn (false );
214
+
215
+ $ this ->customerUrl ->expects ($ this ->any ())->method ('getAccountUrl ' )->willReturn ($ accountUrl );
216
+ $ this ->customerUrl ->expects ($ this ->any ())->method ('getLoginUrl ' )->willReturn ($ loginUrl );
217
+ $ this ->customerUrl ->expects ($ this ->any ())->method ('getLogoutUrl ' )->willReturn ($ logoutUrl );
218
+ $ this ->customerUrl ->expects ($ this ->any ())->method ('getDashboardUrl ' )->willReturn ($ dashboardUrl );
245
219
246
220
$ this ->scopeConfig ->expects ($ this ->any ())
247
221
->method ('isSetFlag ' )
@@ -253,28 +227,18 @@ public function testGetRedirect(
253
227
->with (CustomerUrl::REFERER_QUERY_PARAM_NAME )
254
228
->willReturn ($ referer );
255
229
256
- $ this ->urlDecoder ->expects ($ this ->any ())
257
- ->method ('decode ' )
258
- ->with ($ referer )
259
- ->willReturn ($ referer );
230
+ $ this ->urlDecoder ->expects ($ this ->any ())->method ('decode ' )->with ($ referer )->willReturn ($ referer );
260
231
261
- $ this ->url ->expects ($ this ->any ())
262
- ->method ('isOwnOriginUrl ' )
263
- ->willReturn (true );
232
+ $ this ->url ->expects ($ this ->any ())->method ('isOwnOriginUrl ' )->willReturn (true );
264
233
265
- $ this ->resultRedirect ->expects ($ this ->once ())
266
- ->method ('setUrl ' )
267
- ->with ($ beforeAuthUrl )
268
- ->willReturnSelf ();
234
+ $ this ->resultRedirect ->expects ($ this ->once ())->method ('setUrl ' )->with ($ beforeAuthUrl )->willReturnSelf ();
269
235
270
236
$ this ->resultFactory ->expects ($ this ->once ())
271
237
->method ('create ' )
272
238
->with (ResultFactory::TYPE_REDIRECT )
273
239
->willReturn ($ this ->resultRedirect );
274
240
275
- $ this ->hostChecker ->expects ($ this ->any ())
276
- ->method ('isOwnOrigin ' )
277
- ->willReturn (true );
241
+ $ this ->hostChecker ->expects ($ this ->any ())->method ('isOwnOrigin ' )->willReturn (true );
278
242
279
243
$ this ->model ->getRedirect ();
280
244
}
0 commit comments