Skip to content

Commit a63f89c

Browse files
ACQE-8324: Using rest api update guest cart of configurable product
Updated coding standards for removing variables used once Co-authored-by: Shantanu Dasgupta <108055538+cod40403@users.noreply.github.com>
1 parent be4c355 commit a63f89c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartConfigurableItemRepositoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public function testGuestCartUpdateConfigurableItem()
9292
*/
9393
private function createGuestCart(): string
9494
{
95-
$requestData = ['storeId' => 1];
9695
$quoteId = $this->_webApiCall([
9796
'rest' => [
9897
'resourcePath' => self::RESOURCE_PATH_GUEST_CART,
@@ -103,9 +102,10 @@ private function createGuestCart(): string
103102
'serviceVersion' => self::SERVICE_VERSION_GUEST_CART,
104103
'operation' => self::SERVICE_NAME_GUEST_CART . 'CreateEmptyCart',
105104
],
106-
], $requestData);
105+
], ['storeId' => 1]);
107106
$this->assertTrue(strlen($quoteId) >= 32);
108107

108+
109109
return $quoteId;
110110
}
111111

@@ -140,6 +140,7 @@ private function addConfigurableProductToCart(string $guestCartId): array
140140
$requestData['cartItem']['product_option']['extension_attributes']['configurable_item_options'][0]
141141
);
142142

143+
143144
return $response;
144145
}
145146

@@ -153,8 +154,7 @@ private function addConfigurableProductToCart(string $guestCartId): array
153154
private function verifyCartItems(string $guestCartId, int $expectedItemId): void
154155
{
155156
$serviceInfo = $this->getCartServiceInfo($guestCartId, 'get');
156-
$requestData = ['cartId' => $guestCartId];
157-
$response = $this->_webApiCall($serviceInfo, $requestData);
157+
$response = $this->_webApiCall($serviceInfo, ['cartId' => $guestCartId]);
158158
$this->assertIsArray($response);
159159
$this->assertGreaterThan(0, count($response), 'Cart should contain at least one item');
160160

0 commit comments

Comments
 (0)