Skip to content

Commit bd667ce

Browse files
committed
Merge remote-tracking branch 'l3/MC-34431' into PR-01-21
2 parents 4d946ce + 8c4e1ed commit bd667ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/Quote/Model/GuestCart/GuestBillingAddressManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
4646
{
4747
/** @var $quoteIdMask QuoteIdMask */
4848
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
49-
return $this->billingAddressManagement->assign($quoteIdMask->getQuoteId(), $address, $useForShipping);
49+
return (int)$this->billingAddressManagement->assign($quoteIdMask->getQuoteId(), $address, $useForShipping);
5050
}
5151

5252
/**

app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestBillingAddressManagementTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public function testAssign()
9797
{
9898
$addressId = 1;
9999
$this->billingAddressManagementMock->expects($this->once())->method('assign')->willReturn($addressId);
100-
$this->assertEquals($addressId, $this->model->assign($this->maskedCartId, $this->addressMock));
100+
$actualAddressId = $this->model->assign($this->maskedCartId, $this->addressMock);
101+
$this->assertIsInt($actualAddressId);
102+
$this->assertEquals($addressId, $actualAddressId);
101103
}
102104
}

0 commit comments

Comments
 (0)