File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
app/code/Magento/Multishipping
Test/Unit/Model/Checkout/Type Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -693,6 +693,7 @@ protected function _prepareOrder(\Magento\Quote\Model\Quote\Address $address)
693
693
$ order ->setIsVirtual (1 );
694
694
} else {
695
695
$ order ->setShippingAddress ($ this ->quoteAddressToOrderAddress ->convert ($ address ));
696
+ $ order ->setShippingMethod ($ address ->getShippingMethod ());
696
697
}
697
698
698
699
$ order ->setPayment ($ this ->quotePaymentToOrderPayment ->convert ($ quote ->getPayment ()));
Original file line number Diff line number Diff line change @@ -659,11 +659,13 @@ private function getOrderMock(
659
659
'getId ' ,
660
660
'getCanSendNewEmailFlag ' ,
661
661
'getItems ' ,
662
+ 'setShippingMethod ' ,
662
663
]
663
664
)->getMock ();
664
665
$ orderMock ->method ('setQuote ' )->with ($ this ->quoteMock );
665
666
$ orderMock ->method ('setBillingAddress ' )->with ($ orderAddressMock )->willReturnSelf ();
666
667
$ orderMock ->method ('setShippingAddress ' )->with ($ orderAddressMock )->willReturnSelf ();
668
+ $ orderMock ->expects ($ this ->once ())->method ('setShippingMethod ' )->with ('carrier ' )->willReturnSelf ();
667
669
$ orderMock ->method ('setPayment ' )->with ($ orderPaymentMock )->willReturnSelf ();
668
670
$ orderMock ->method ('addItem ' )->with ($ orderItemMock )->willReturnSelf ();
669
671
$ orderMock ->method ('getIncrementId ' )->willReturn ('1 ' );
You can’t perform that action at this time.
0 commit comments