Skip to content

Commit 68101c5

Browse files
committed
AC-13828::Unable to place order with paypal express checkout when we are directly checking out from cart page
1 parent de232b3 commit 68101c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Quote/Test/Unit/Model/CustomerManagementTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ public function testValidateAddressesNotSavedInAddressBook()
269269
{
270270
$this->expectException(ValidatorException::class);
271271
$this->quoteMock->method('getCustomerIsGuest')->willReturn(true);
272+
$this->quoteAddressMock->expects($this->any())->method('getCustomerAddressId')->willReturn(2);
272273
$this->quoteAddressMock->method('getStreet')->willReturn(['test']);
273274
$this->quoteAddressMock->method('getCustomAttributes')->willReturn(['test']);
274275
$this->customerAddressFactoryMock->method('create')
@@ -278,14 +279,13 @@ public function testValidateAddressesNotSavedInAddressBook()
278279
->getMock();
279280
$this->addressFactoryMock->expects($this->exactly(1))->method('create')->willReturn($addressMock);
280281
$this->quoteMock
281-
->expects($this->atMost(2))
282+
->expects($this->any())
282283
->method('getBillingAddress')
283284
->willReturn($this->quoteAddressMock);
284285
$this->quoteMock
285-
->expects($this->once())
286+
->expects($this->any())
286287
->method('getShippingAddress')
287288
->willReturn($this->quoteAddressMock);
288-
$this->quoteAddressMock->expects($this->any())->method('getCustomerAddressId')->willReturn(null);
289289
$validatorMock = $this->getMockBuilder(Validator::class)
290290
->disableOriginalConstructor()
291291
->getMock();

0 commit comments

Comments
 (0)