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)
625
625
$ addressId = $ address ->getId ();
626
626
if (isset ($ methods [$ addressId ])) {
627
627
$ address ->setShippingMethod ($ methods [$ addressId ]);
628
+ $ address ->setCollectShippingRates (true );
628
629
} elseif (!$ address ->getShippingMethod ()) {
629
630
throw new \Magento \Framework \Exception \LocalizedException (
630
631
__ ('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()
420
420
$ methodsArray = [1 => 'flatrate_flatrate ' , 2 => 'tablerate_bestway ' ];
421
421
$ addressId = 1 ;
422
422
$ addressMock = $ this ->getMockBuilder (QuoteAddress::class)
423
- ->setMethods (['getId ' , 'setShippingMethod ' ])
423
+ ->setMethods (['getId ' , 'setShippingMethod ' , ' setCollectShippingRates ' ])
424
424
->disableOriginalConstructor ()
425
425
->getMock ();
426
426
427
427
$ addressMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ addressId );
428
428
$ this ->quoteMock ->expects ($ this ->once ())->method ('getAllShippingAddresses ' )->willReturn ([$ addressMock ]);
429
429
$ addressMock ->expects ($ this ->once ())->method ('setShippingMethod ' )->with ($ methodsArray [$ addressId ]);
430
+ $ addressMock ->expects ($ this ->once ())
431
+ ->method ('setCollectShippingRates ' )
432
+ ->with (true );
430
433
$ this ->quoteMock ->expects ($ this ->once ())
431
434
->method ('__call ' )
432
435
->with ('setTotalsCollectedFlag ' , [false ])
You can’t perform that action at this time.
0 commit comments