Skip to content

Commit e539477

Browse files
ACQE-8324: Using rest api update guest cart of configurable product
- Organized import statements and added return type
1 parent 3432ada commit e539477

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
use Magento\ConfigurableProduct\Test\Fixture\Product as ConfigurableProductFixture;
1616
use Magento\Framework\Exception\NoSuchEntityException;
1717
use Magento\Framework\Webapi\Rest\Request;
18-
use Magento\Integration\Api\AdminTokenServiceInterface;
19-
use Magento\Integration\Model\Oauth\Token as TokenModel;
2018
use Magento\TestFramework\Fixture\DataFixture;
2119
use Magento\TestFramework\Fixture\DataFixtureStorage;
2220
use Magento\TestFramework\Fixture\DataFixtureStorageManager;
2321
use Magento\TestFramework\Helper\Bootstrap;
2422
use Magento\TestFramework\TestCase\WebapiAbstract;
25-
use Magento\User\Model\User as UserModel;
2623

2724
/**
2825
* Test for Magento\Quote\Api\GuestCartConfigurableItemRepositoryTest.
@@ -38,8 +35,6 @@ class GuestCartConfigurableItemRepositoryTest extends WebapiAbstract
3835

3936
private const SERVICE_NAME_GUEST_CART_ITEM = 'quoteGuestCartItemRepositoryV1';
4037

41-
private const SERVICE_VERSION_GUEST_CART_ITEM = 'V1';
42-
4338
/**
4439
* @var array
4540
*/
@@ -61,6 +56,9 @@ protected function setUp(): void
6156

6257
/**
6358
* Test guest cart update with configurable item
59+
*
60+
* @return void
61+
* @throws NoSuchEntityException
6462
*/
6563
#[
6664
DataFixture(ProductFixture::class, ['price' => 10, 'sku' => 'simple-10'], as: 'p1'),
@@ -77,7 +75,7 @@ protected function setUp(): void
7775
'configurableProduct'
7876
)
7977
]
80-
public function testGuestCartUpdateConfigurableItem()
78+
public function testGuestCartUpdateConfigurableItem(): void
8179
{
8280
$guestCartId = $this->createGuestCart();
8381
$response = $this->addConfigurableProductToCart($guestCartId);
@@ -219,7 +217,7 @@ private function getConfigurableProduct(): ProductInterface
219217
foreach ($simpleProducts as $simpleProduct) {
220218
$this->simpleProductSkus[] = $simpleProduct->getSku();
221219
}
222-
220+
223221
return $configurableProduct;
224222
}
225223

@@ -311,7 +309,7 @@ private function getCartServiceInfo(
311309
],
312310
'soap' => [
313311
'service' => self::SERVICE_NAME_GUEST_CART_ITEM,
314-
'serviceVersion' => self::SERVICE_VERSION_GUEST_CART_ITEM,
312+
'serviceVersion' => self::SERVICE_VERSION_GUEST_CART,
315313
'operation' => $soapOperation,
316314
],
317315
];

0 commit comments

Comments
 (0)