Skip to content

Commit 4586a23

Browse files
author
Anna Bukatar
committed
ACP2E-1415: Error when creating a schedule change for product
1 parent ea0cf63 commit 4586a23

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-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: 4 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,9 @@ 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), $addressInformationMock
78+
)
7779
->willReturn($paymentInformationMock);
7880

7981
$this->model->saveAddressInformation($cartId, $addressInformationMock);

0 commit comments

Comments
 (0)