Skip to content

Commit a28d95f

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

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

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

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ protected function setUp(): void
6666
*/
6767
public function testSaveAddressInformationWithValidData()
6868
{
69-
$cartId = $this->getMaskedCartId('test01');
69+
$quote = Bootstrap::getObjectManager()->create(Quote::class);
70+
$quote->load('test_order_1', 'reserved_order_id');
71+
$cartId = $quote->getId();
7072
$shippingAddress = $this->addressFactory->create();
7173
$shippingAddress->setData([
7274
'firstname' => 'John',
@@ -106,21 +108,6 @@ public function testSaveAddressInformationWithValidData()
106108
$this->assertArrayHasKey('totals', $result);
107109
}
108110

109-
/**
110-
* Get masked cart ID for the given quote
111-
*
112-
* @param string $reservedOrderId
113-
* @return string
114-
*/
115-
private function getMaskedCartId(string $reservedOrderId): string
116-
{
117-
$quote = Bootstrap::getObjectManager()->create(Quote::class);
118-
$quote->load($reservedOrderId, 'reserved_order_id');
119-
$quoteIdMask = $this->quoteIdMaskFactory->create();
120-
$quoteIdMask->load($quote->getId(), 'quote_id');
121-
return $quoteIdMask->getMaskedId();
122-
}
123-
124111
/**
125112
* Call the saveAddressInformation API
126113
*

0 commit comments

Comments
 (0)