Skip to content

Commit c4b76ff

Browse files
committed
ACP2E-4156: For Shipping Information Server Side Validation is not Working using REST API
1 parent d09a26a commit c4b76ff

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,12 @@ public function testSaveAddressInformation()
7777
$quoteId = '100';
7878
$addressInformationMock = $this->getMockForAbstractClass(ShippingInformationInterface::class);
7979
$shippingAddressMock = $this->getMockForAbstractClass(AddressInterface::class);
80-
$billingAddressMock = $this->getMockForAbstractClass(AddressInterface::class);
8180
$addressInformationMock->expects($this->once())
8281
->method('getShippingAddress')
8382
->willReturn($shippingAddressMock);
84-
$addressInformationMock->expects($this->once())
85-
->method('getBillingAddress')
86-
->willReturn($billingAddressMock);
8783
$shippingAddressMock->expects($this->once())
8884
->method('getExtensionAttributes')
8985
->willReturn(null);
90-
$billingAddressMock->expects($this->once())
91-
->method('getExtensionAttributes')
92-
->willReturn(null);
9386
$customerAddressMock = $this->createMock(Address::class);
9487
$this->addressFactoryMock->expects($this->once())
9588
->method('create')
@@ -99,7 +92,7 @@ public function testSaveAddressInformation()
9992
->method('createValidator')
10093
->with('customer_address', 'save')
10194
->willReturn($validatorMock);
102-
$validatorMock->expects($this->exactly(2))->method('isValid')->willReturn(true);
95+
$validatorMock->expects($this->once())->method('isValid')->willReturn(true);
10396
$quoteIdMaskMock = $this->getMockBuilder(QuoteIdMask::class)
10497
->addMethods(['getQuoteId'])
10598
->onlyMethods(['load'])

0 commit comments

Comments
 (0)