@@ -269,7 +269,7 @@ public function testDispatchWithDefaultCustomerGroupId()
269
269
$ this ->quoteMock ->expects ($ this ->once ())
270
270
->method ('getCustomerGroupId ' )
271
271
->willReturn ('customerGroupId ' );
272
- $ this ->customerMock ->expects ($ this ->once ( ))->method ('getId ' )->willReturn ('1 ' );
272
+ $ this ->customerMock ->expects ($ this ->exactly ( 2 ))->method ('getId ' )->willReturn ('1 ' );
273
273
$ this ->groupManagementMock ->expects ($ this ->once ())
274
274
->method ('getDefaultGroup ' )
275
275
->willReturn ($ this ->groupInterfaceMock );
@@ -329,6 +329,7 @@ public function testDispatchWithCustomerCountryInEU()
329
329
->method ('setPrevQuoteCustomerGroupId ' )
330
330
->with ('customerGroupId ' );
331
331
332
+ $ this ->customerMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ('1 ' );
332
333
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomerGroupId ' )->with ('customerGroupId ' );
333
334
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomer ' )->with ($ this ->customerMock );
334
335
$ this ->customerDataFactoryMock ->expects ($ this ->any ())
@@ -436,6 +437,8 @@ public function testDispatchWithEmptyShippingAddress()
436
437
->method ('setPrevQuoteCustomerGroupId ' )
437
438
->with ('customerGroupId ' );
438
439
440
+ $ this ->customerMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ('1 ' );
441
+
439
442
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomerGroupId ' )->with ('customerGroupId ' );
440
443
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomer ' )->with ($ this ->customerMock );
441
444
$ this ->customerDataFactoryMock ->expects ($ this ->any ())
0 commit comments