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(
31
31
}
32
32
33
33
/**
34
- * { @inheritDoc}
34
+ * @inheritDoc
35
35
*/
36
36
public function saveAddressInformation (
37
37
$ cartId ,
@@ -40,7 +40,7 @@ public function saveAddressInformation(
40
40
/** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */
41
41
$ quoteIdMask = $ this ->quoteIdMaskFactory ->create ()->load ($ cartId , 'masked_id ' );
42
42
return $ this ->shippingInformationManagement ->saveAddressInformation (
43
- $ quoteIdMask ->getQuoteId (),
43
+ ( int ) $ quoteIdMask ->getQuoteId (),
44
44
$ addressInformation
45
45
);
46
46
}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ protected function setUp(): void
57
57
public function testSaveAddressInformation ()
58
58
{
59
59
$ cartId = 'masked_id ' ;
60
- $ quoteId = 100 ;
60
+ $ quoteId = ' 100 ' ;
61
61
$ addressInformationMock = $ this ->getMockForAbstractClass (ShippingInformationInterface::class);
62
62
63
63
$ quoteIdMaskMock = $ this ->getMockBuilder (QuoteIdMask::class)
@@ -73,7 +73,10 @@ public function testSaveAddressInformation()
73
73
$ paymentInformationMock = $ this ->getMockForAbstractClass (PaymentDetailsInterface::class);
74
74
$ this ->shippingInformationManagementMock ->expects ($ this ->once ())
75
75
->method ('saveAddressInformation ' )
76
- ->with ($ quoteId , $ addressInformationMock )
76
+ ->with (
77
+ self ::callback (fn ($ actualQuoteId ): bool => (int ) $ quoteId === $ actualQuoteId ),
78
+ $ addressInformationMock
79
+ )
77
80
->willReturn ($ paymentInformationMock );
78
81
79
82
$ this ->model ->saveAddressInformation ($ cartId , $ addressInformationMock );
You can’t perform that action at this time.
0 commit comments