16
16
*/
17
17
class CategoryListTest extends GraphQlAbstract
18
18
{
19
-
20
19
/**
21
20
* @magentoApiDataFixture Magento/Catalog/_files/categories.php
22
21
* @dataProvider filterSingleCategoryDataProvider
@@ -39,7 +38,6 @@ public function testFilterSingleCategoryByField($field, $condition, $value, $exp
39
38
}
40
39
}
41
40
QUERY ;
42
-
43
41
$ result = $ this ->graphQlQuery ($ query );
44
42
$ this ->assertArrayNotHasKey ('errors ' , $ result );
45
43
$ this ->assertCount (1 , $ result ['categoryList ' ]);
@@ -69,7 +67,6 @@ public function testFilterMultipleCategoriesByField($field, $condition, $value,
69
67
}
70
68
}
71
69
QUERY ;
72
-
73
70
$ result = $ this ->graphQlQuery ($ query );
74
71
$ this ->assertArrayNotHasKey ('errors ' , $ result );
75
72
$ this ->assertCount (count ($ expectedResult ), $ result ['categoryList ' ]);
@@ -96,7 +93,6 @@ public function testFilterCategoryByMultipleFields()
96
93
}
97
94
}
98
95
QUERY ;
99
-
100
96
$ result = $ this ->graphQlQuery ($ query );
101
97
$ this ->assertArrayNotHasKey ('errors ' , $ result );
102
98
$ this ->assertCount (3 , $ result ['categoryList ' ]);
@@ -121,7 +117,6 @@ public function testFilterWithInactiveCategory()
121
117
}
122
118
}
123
119
QUERY ;
124
-
125
120
$ result = $ this ->graphQlQuery ($ query );
126
121
$ this ->assertArrayNotHasKey ('errors ' , $ result );
127
122
$ this ->assertCount (1 , $ result ['categoryList ' ]);
@@ -168,9 +163,7 @@ public function testQueryChildCategoriesWithProducts()
168
163
}
169
164
}
170
165
QUERY ;
171
-
172
166
$ result = $ this ->graphQlQuery ($ query );
173
- $ a = 3 ;
174
167
175
168
$ this ->assertArrayNotHasKey ('errors ' , $ result );
176
169
$ this ->assertCount (1 , $ result ['categoryList ' ]);
@@ -234,7 +227,6 @@ public function testNoResultsFound()
234
227
}
235
228
}
236
229
QUERY ;
237
-
238
230
$ result = $ this ->graphQlQuery ($ query );
239
231
$ this ->assertArrayNotHasKey ('errors ' , $ result );
240
232
$ this ->assertArrayHasKey ('categoryList ' , $ result );
@@ -261,7 +253,6 @@ public function testEmptyFiltersReturnRootCategory()
261
253
}
262
254
}
263
255
QUERY ;
264
-
265
256
$ storeManager = Bootstrap::getObjectManager ()->get (StoreManagerInterface::class);
266
257
$ storeRootCategoryId = $ storeManager ->getStore ()->getRootCategoryId ();
267
258
@@ -292,7 +283,6 @@ public function testMinimumMatchQueryLength()
292
283
}
293
284
}
294
285
QUERY ;
295
-
296
286
$ result = $ this ->graphQlQuery ($ query );
297
287
$ this ->assertArrayNotHasKey ('errors ' , $ result );
298
288
$ this ->assertArrayHasKey ('categoryList ' , $ result );
@@ -351,6 +341,7 @@ public function filterSingleCategoryDataProvider(): array
351
341
}
352
342
353
343
/**
344
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
354
345
* @return array
355
346
*/
356
347
public function filterMultipleCategoriesDataProvider (): array
0 commit comments