Skip to content

Commit 5e0203f

Browse files
committed
ACP2E-2202: Fix WebApi test Magento\GraphQl\Catalog\ProductSearchTest::testFilterProductsBySingleCategoryId with data set #0 ('category_id', '333')
1 parent c524863 commit 5e0203f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,13 +1934,11 @@ public function testFilterProductsBySingleCategoryId(string $fieldName, string $
19341934
$this->assertEquals($response['products']['items'][$itemIndex]['name'], $product->getName());
19351935
$this->assertEquals($response['products']['items'][$itemIndex]['type_id'], $product->getTypeId());
19361936
$categoryIds = array_map('intval', $product->getCategoryIds());
1937+
$this->assertCount(count($categoryIds), $response['products']['items'][$itemIndex]['categories']);
19371938
$categoryInResponse = array_combine(
19381939
array_column($response['products']['items'][$itemIndex]['categories'], 'id'),
19391940
$response['products']['items'][$itemIndex]['categories']
19401941
);
1941-
sort($categoryIds);
1942-
ksort($categoryInResponse);
1943-
$this->assertCount(count($categoryIds), $categoryInResponse);
19441942
foreach ($categoryIds as $categoryId) {
19451943
$this->assertArrayHasKey($categoryId, $categoryInResponse);
19461944
/** @var CategoryInterface | Category $category */

0 commit comments

Comments
 (0)