Skip to content

Commit b040348

Browse files
ACQE-8324: Using rest api update guest cart of configurable product
- Fixed Static test issues
1 parent a490f5d commit b040348

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright 2025 Adobe
44
* All Rights Reserved.
55
*/
6+
7+
declare(strict_types=1);
8+
69
namespace Magento\Quote\Api;
710

811
use Magento\Catalog\Api\ProductRepositoryInterface;
@@ -144,10 +147,8 @@ private function addConfigurableProductToCart(string $guestCartId, string $admin
144147

145148
private function verifyCartItems(string $guestCartId, string $adminToken, int $expectedItemId)
146149
{
147-
$serviceInfo = $this->getCartServiceInfo($guestCartId, $adminToken,'get');
148-
150+
$serviceInfo = $this->getCartServiceInfo($guestCartId, $adminToken, 'get');
149151
$response = $this->_webApiCall($serviceInfo, []);
150-
151152
$this->assertIsArray($response);
152153
$this->assertGreaterThan(0, count($response), 'Cart should contain at least one item');
153154

@@ -236,8 +237,12 @@ private function buildCartItemRequestData(string $cartId, string $sku, int $attr
236237
];
237238
}
238239

239-
private function getCartServiceInfo(string $cartId, string $adminToken, string $action = 'add', int $itemId = null): array
240-
{
240+
private function getCartServiceInfo(
241+
string $cartId,
242+
string $adminToken,
243+
string $action = 'add',
244+
?int $itemId = null
245+
): array {
241246
$resourcePath = self::RESOURCE_PATH_GUEST_CART . $cartId . '/items';
242247
if ($action === 'update' && $itemId !== null) {
243248
$resourcePath .= '/' . $itemId;

0 commit comments

Comments
 (0)