@@ -247,8 +247,8 @@ public function testConvertCustomerCartToGuest()
247
247
$ emailArgs = ['email ' => null ];
248
248
249
249
$ this ->checkoutSessionMock ->expects ($ this ->once ())
250
- ->method ('getQuote ' )->willReturn ($ this -> quoteMock );
251
- $ this ->quoteMock ->expects ($ this ->exactly ( 2 ))->method ('getId ' )->willReturn ($ quoteId );
250
+ ->method ('getQuoteId ' )->willReturn ($ quoteId );
251
+ $ this ->quoteMock ->expects ($ this ->once ( ))->method ('getId ' )->willReturn ($ quoteId );
252
252
$ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with ($ quoteId )->willReturn ($ this ->quoteMock );
253
253
$ this ->quoteMock ->expects ($ this ->once ())
254
254
->method ('setIsActive ' )->with (true )->willReturn ($ this ->quoteMock );
@@ -288,18 +288,15 @@ public function testConvertCustomerCartToGuest()
288
288
public function testConvertCustomerCartToGuestWithEmptyQuote ()
289
289
{
290
290
$ this ->checkoutSessionMock ->expects ($ this ->once ())
291
- ->method ('getQuote ' )->willReturn ($ this ->quoteMock );
292
- $ this ->quoteMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (null );
291
+ ->method ('getQuoteId ' )->willReturn (null );
293
292
$ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with (null )->willReturn (null );
294
-
295
293
$ this ->model ->convertCustomerCartToGuest ();
296
294
}
297
295
298
296
public function testConvertCustomerCartToGuestWithEmptyQuoteId ()
299
297
{
300
298
$ this ->checkoutSessionMock ->expects ($ this ->once ())
301
- ->method ('getQuote ' )->willReturn ($ this ->quoteMock );
302
- $ this ->quoteMock ->expects ($ this ->once ())->method ('getId ' )->willReturn (1 );
299
+ ->method ('getQuoteId ' )->willReturn (1 );
303
300
$ quoteWithNoId = $ this ->quoteMock = $ this ->createMock (\Magento \Quote \Model \Quote::class);
304
301
$ quoteWithNoId ->expects ($ this ->once ())->method ('getId ' )->willReturn (null );
305
302
$ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with (1 )->willReturn ($ quoteWithNoId );
0 commit comments