Skip to content

Commit 44569d5

Browse files
authored
#22228: Suppress PHPCS violations in test
1 parent 660c989 commit 44569d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dev/tests/integration/testsuite/Magento/GraphQlCache/Controller/Catalog/DeepNestedCategoriesAndProductsTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ public function testDispatchForCacheHeadersOnDeepNestedQueries(): void
6969

7070
$productIdsFromCategory = $category->getProductCollection()->getAllIds();
7171
foreach ($productIdsFromCategory as $productId) {
72+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
7273
$resolvedCategoryIds = array_merge(
7374
$resolvedCategoryIds,
7475
$productRepository->getById($productId)->getCategoryIds()
7576
);
7677
}
7778

79+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
7880
$resolvedCategoryIds = array_merge($resolvedCategoryIds, [$baseCategoryId]);
7981
foreach ($resolvedCategoryIds as $categoryId) {
8082
$category = $categoryRepository->get($categoryId);
@@ -88,9 +90,11 @@ public function testDispatchForCacheHeadersOnDeepNestedQueries(): void
8890
$uniqueCategoryIds = array_unique($resolvedCategoryIds);
8991
$expectedCacheTags = ['cat_c', 'cat_p', 'FPC'];
9092
foreach ($uniqueProductIds as $uniqueProductId) {
93+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
9194
$expectedCacheTags = array_merge($expectedCacheTags, ['cat_p_' . $uniqueProductId]);
9295
}
9396
foreach ($uniqueCategoryIds as $uniqueCategoryId) {
97+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
9498
$expectedCacheTags = array_merge($expectedCacheTags, ['cat_c_' . $uniqueCategoryId]);
9599
}
96100

0 commit comments

Comments
 (0)