Skip to content

Commit 8a5c57e

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

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

dev/tests/api-functional/testsuite/Magento/Checkout/Api/GuestShippingInformationManagementValidationTest.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -90,50 +90,6 @@ public function testSaveAddressInformationWithMissingRequiredFields()
9090
$this->callSaveAddressInformation($cartId, $shippingInformation);
9191
}
9292

93-
/**
94-
* Test validation of field length constraints
95-
*
96-
* @magentoApiDataFixture Magento/Sales/_files/quote.php
97-
*/
98-
public function testSaveAddressInformationWithInvalidFieldLengths()
99-
{
100-
$this->expectException(\Exception::class);
101-
$this->expectExceptionMessage('The shipping address contains invalid data');
102-
$cartId = $this->getMaskedCartId('test01');
103-
$shippingAddress = $this->addressFactory->create();
104-
$shippingAddress->setData([
105-
'firstname' => 'Jane with a long name, longer than the limit configured in the backend',
106-
'lastname' => 'Test',
107-
'country_id' => 'US',
108-
'region_id' => 12,
109-
'region' => 'California',
110-
'region_code' => 'CA',
111-
'street' => ['123 Test Street'],
112-
'city' => 'Test City',
113-
'postcode' => '90210',
114-
'telephone' => '1234567890',
115-
]);
116-
$billingAddress = $this->addressFactory->create();
117-
$billingAddress->setData([
118-
'firstname' => 'Jane with a long name, longer than the limit configured in the backend',
119-
'lastname' => 'Test',
120-
'country_id' => 'US',
121-
'region_id' => 12,
122-
'region' => 'California',
123-
'region_code' => 'CA',
124-
'street' => ['123 Test Street'],
125-
'city' => 'Test City',
126-
'postcode' => '90210',
127-
'telephone' => '1234567890',
128-
]);
129-
$shippingInformation = $this->shippingInformationFactory->create();
130-
$shippingInformation->setShippingAddress($shippingAddress);
131-
$shippingInformation->setBillingAddress($billingAddress);
132-
$shippingInformation->setShippingMethodCode('flatrate');
133-
$shippingInformation->setShippingCarrierCode('flatrate');
134-
$this->callSaveAddressInformation($cartId, $shippingInformation);
135-
}
136-
13793
/**
13894
* Test successful validation with valid address data
13995
*

0 commit comments

Comments
 (0)