File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
app/code/Magento/Checkout Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function __construct(
3131 }
3232
3333 /**
34- * { @inheritDoc}
34+ * @inheritDoc
3535 */
3636 public function saveAddressInformation (
3737 $ cartId ,
@@ -40,7 +40,7 @@ public function saveAddressInformation(
4040 /** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */
4141 $ quoteIdMask = $ this ->quoteIdMaskFactory ->create ()->load ($ cartId , 'masked_id ' );
4242 return $ this ->shippingInformationManagement ->saveAddressInformation (
43- $ quoteIdMask ->getQuoteId (),
43+ ( int ) $ quoteIdMask ->getQuoteId (),
4444 $ addressInformation
4545 );
4646 }
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ protected function setUp(): void
5757 public function testSaveAddressInformation ()
5858 {
5959 $ cartId = 'masked_id ' ;
60- $ quoteId = 100 ;
60+ $ quoteId = ' 100 ' ;
6161 $ addressInformationMock = $ this ->getMockForAbstractClass (ShippingInformationInterface::class);
6262
6363 $ quoteIdMaskMock = $ this ->getMockBuilder (QuoteIdMask::class)
@@ -73,7 +73,10 @@ public function testSaveAddressInformation()
7373 $ paymentInformationMock = $ this ->getMockForAbstractClass (PaymentDetailsInterface::class);
7474 $ this ->shippingInformationManagementMock ->expects ($ this ->once ())
7575 ->method ('saveAddressInformation ' )
76- ->with ($ quoteId , $ addressInformationMock )
76+ ->with (
77+ self ::callback (fn ($ actualQuoteId ): bool => (int ) $ quoteId === $ actualQuoteId ),
78+ $ addressInformationMock
79+ )
7780 ->willReturn ($ paymentInformationMock );
7881
7982 $ this ->model ->saveAddressInformation ($ cartId , $ addressInformationMock );
You can’t perform that action at this time.
0 commit comments