Skip to content

Commit f5b1563

Browse files
committed
Merge branch 'ACP2E-1459' of https://github.com/magento-l3/magento2ce into PR-01-10-2023
2 parents 6c1aaf0 + 13b4dd5 commit f5b1563

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)