Skip to content

Commit 97936d3

Browse files
committed
MCP-792: Wrong error message is sent in email if order is rejected because of disabled product
1 parent 40a0f13 commit 97936d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ public function testSavePaymentInformationWithoutBillingAddress()
180180
$paymentMock = $this->getMockForAbstractClass(PaymentInterface::class);
181181
$billingAddressMock = $this->getMockForAbstractClass(AddressInterface::class);
182182
$quoteMock = $this->createMock(Quote::class);
183+
$quoteMock->expects($this->any())->method('getItemsQty')->willReturn(1);
183184

184185
$billingAddressMock->expects($this->once())->method('setEmail')->with($email)->willReturnSelf();
185186

@@ -210,6 +211,7 @@ public function testSavePaymentInformationAndPlaceOrderWithLocalizedException()
210211

211212
$quoteMock = $this->createMock(Quote::class);
212213
$quoteMock->method('getBillingAddress')->willReturn($billingAddressMock);
214+
$quoteMock->expects($this->any())->method('getItemsQty')->willReturn(1);
213215
$this->cartRepositoryMock->method('getActive')->with($cartId)->willReturn($quoteMock);
214216

215217
$quoteIdMask = $this->getMockBuilder(QuoteIdMask::class)
@@ -266,6 +268,9 @@ private function getMockForAssignBillingAddress(
266268
$this->cartRepositoryMock->method('getActive')
267269
->with($cartId)
268270
->willReturn($quote);
271+
$quote->expects($this->any())
272+
->method('getItemsQty')
273+
->willReturn(1);
269274
$quote->expects($this->any())
270275
->method('getBillingAddress')
271276
->willReturn($quoteBillingAddress);

0 commit comments

Comments
 (0)