File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
app/code/Magento/Multishipping
Test/Unit/Model/Checkout/Type Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,7 @@ public function setShippingMethods($methods)
625625 $ addressId = $ address ->getId ();
626626 if (isset ($ methods [$ addressId ])) {
627627 $ address ->setShippingMethod ($ methods [$ addressId ]);
628+ $ address ->setCollectShippingRates (true );
628629 } elseif (!$ address ->getShippingMethod ()) {
629630 throw new \Magento \Framework \Exception \LocalizedException (
630631 __ ('Set shipping methods for all addresses. Verify the shipping methods and try again. ' )
Original file line number Diff line number Diff line change @@ -420,13 +420,16 @@ public function testSetShippingMethods()
420420 $ methodsArray = [1 => 'flatrate_flatrate ' , 2 => 'tablerate_bestway ' ];
421421 $ addressId = 1 ;
422422 $ addressMock = $ this ->getMockBuilder (QuoteAddress::class)
423- ->setMethods (['getId ' , 'setShippingMethod ' ])
423+ ->setMethods (['getId ' , 'setShippingMethod ' , ' setCollectShippingRates ' ])
424424 ->disableOriginalConstructor ()
425425 ->getMock ();
426426
427427 $ addressMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ addressId );
428428 $ this ->quoteMock ->expects ($ this ->once ())->method ('getAllShippingAddresses ' )->willReturn ([$ addressMock ]);
429429 $ addressMock ->expects ($ this ->once ())->method ('setShippingMethod ' )->with ($ methodsArray [$ addressId ]);
430+ $ addressMock ->expects ($ this ->once ())
431+ ->method ('setCollectShippingRates ' )
432+ ->with (true );
430433 $ this ->quoteMock ->expects ($ this ->once ())
431434 ->method ('__call ' )
432435 ->with ('setTotalsCollectedFlag ' , [false ])
You can’t perform that action at this time.
0 commit comments