@@ -55,23 +55,28 @@ protected function setUp()
55
55
{
56
56
$ this ->persistentSessionMock = $ this ->createMock (\Magento \Persistent \Helper \Session::class);
57
57
$ this ->sessionMock =
58
- $ this ->createPartialMock (\Magento \Persistent \Model \Session::class, [
58
+ $ this ->createPartialMock (
59
+ \Magento \Persistent \Model \Session::class,
60
+ [
59
61
'setLoadInactive ' ,
60
62
'setCustomerData ' ,
61
63
'clearQuote ' ,
62
64
'clearStorage ' ,
63
65
'getQuote ' ,
64
66
'removePersistentCookie ' ,
65
67
'__wakeup ' ,
66
- ]);
68
+ ]
69
+ );
67
70
$ this ->persistentDataMock = $ this ->createMock (\Magento \Persistent \Helper \Data::class);
68
71
$ this ->checkoutSessionMock = $ this ->createMock (\Magento \Checkout \Model \Session::class);
69
72
70
73
$ this ->abstractCollectionMock =
71
74
$ this ->createMock (\Magento \Eav \Model \Entity \Collection \AbstractCollection::class);
72
75
73
76
$ this ->quoteRepositoryMock = $ this ->createMock (\Magento \Quote \Api \CartRepositoryInterface::class);
74
- $ this ->quoteMock = $ this ->createPartialMock (\Magento \Quote \Model \Quote::class, [
77
+ $ this ->quoteMock = $ this ->createPartialMock (
78
+ \Magento \Quote \Model \Quote::class,
79
+ [
75
80
'getId ' ,
76
81
'getIsPersistent ' ,
77
82
'getPaymentsCollection ' ,
@@ -90,7 +95,8 @@ protected function setUp()
90
95
'getIsActive ' ,
91
96
'getCustomerId ' ,
92
97
'__wakeup '
93
- ]);
98
+ ]
99
+ );
94
100
95
101
$ this ->model = new QuoteManager (
96
102
$ this ->persistentSessionMock ,
@@ -258,21 +264,22 @@ public function testConvertCustomerCartToGuest()
258
264
->method ('setCustomerFirstname ' )->with (null )->willReturn ($ this ->quoteMock );
259
265
$ this ->quoteMock ->expects ($ this ->once ())
260
266
->method ('setCustomerLastname ' )->with (null )->willReturn ($ this ->quoteMock );
261
- $ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomerGroupId ' )
262
- ->with (\Magento \Customer \Model \GroupManagement::NOT_LOGGED_IN_ID )
267
+ $ this ->quoteMock ->expects ($ this ->never ())->method ('setCustomerGroupId ' )
263
268
->willReturn ($ this ->quoteMock );
264
269
$ this ->quoteMock ->expects ($ this ->once ())
265
270
->method ('setIsPersistent ' )->with (false )->willReturn ($ this ->quoteMock );
266
271
$ this ->quoteMock ->expects ($ this ->exactly (3 ))
267
272
->method ('getAddressesCollection ' )->willReturn ($ this ->abstractCollectionMock );
268
- $ this ->abstractCollectionMock ->expects ($ this ->exactly (3 ))->method ('walk ' )->with ($ this ->logicalOr (
269
- $ this ->equalTo ('setCustomerAddressId ' ),
270
- $ this ->equalTo ($ addressArgs ),
271
- $ this ->equalTo ('setCustomerId ' ),
272
- $ this ->equalTo ($ customerIdArgs ),
273
- $ this ->equalTo ('setEmail ' ),
274
- $ this ->equalTo ($ emailArgs )
275
- ));
273
+ $ this ->abstractCollectionMock ->expects ($ this ->exactly (3 ))->method ('walk ' )->with (
274
+ $ this ->logicalOr (
275
+ $ this ->equalTo ('setCustomerAddressId ' ),
276
+ $ this ->equalTo ($ addressArgs ),
277
+ $ this ->equalTo ('setCustomerId ' ),
278
+ $ this ->equalTo ($ customerIdArgs ),
279
+ $ this ->equalTo ('setEmail ' ),
280
+ $ this ->equalTo ($ emailArgs )
281
+ )
282
+ );
276
283
$ this ->quoteMock ->expects ($ this ->once ())->method ('collectTotals ' )->willReturn ($ this ->quoteMock );
277
284
$ this ->persistentSessionMock ->expects ($ this ->once ())
278
285
->method ('getSession ' )->willReturn ($ this ->sessionMock );
0 commit comments