File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ public function createEmptyCart()
232
232
$ quote ->setShippingAddress ($ this ->quoteAddressFactory ->create ());
233
233
234
234
try {
235
+ $ quote ->getShippingAddress ()->setCollectShippingRates (true );
235
236
$ this ->quoteRepository ->save ($ quote );
236
237
} catch (\Exception $ e ) {
237
238
throw new CouldNotSaveException (__ ('Cannot create quote ' ));
Original file line number Diff line number Diff line change @@ -246,11 +246,15 @@ public function testCreateEmptyCartAnonymous()
246
246
$ quoteId = 2311 ;
247
247
248
248
$ quoteMock = $ this ->createMock (\Magento \Quote \Model \Quote::class);
249
-
250
- $ quoteAddress = $ this ->createMock (\Magento \Quote \Model \Quote \Address::class);
249
+ $ quoteAddress = $ this ->createPartialMock (
250
+ \Magento \Quote \Model \Quote \Address::class,
251
+ ['setCollectShippingRates ' ]
252
+ );
253
+ $ quoteAddress ->expects ($ this ->once ())->method ('setCollectShippingRates ' )->with (true );
251
254
252
255
$ quoteMock ->expects ($ this ->any ())->method ('setBillingAddress ' )->with ($ quoteAddress )->willReturnSelf ();
253
256
$ quoteMock ->expects ($ this ->any ())->method ('setShippingAddress ' )->with ($ quoteAddress )->willReturnSelf ();
257
+ $ quoteMock ->expects ($ this ->any ())->method ('getShippingAddress ' )->willReturn ($ quoteAddress );
254
258
255
259
$ this ->quoteAddressFactory ->expects ($ this ->any ())->method ('create ' )->willReturn ($ quoteAddress );
256
260
You can’t perform that action at this time.
0 commit comments