@@ -638,7 +638,7 @@ public function testFilterByCategoryIdAndCustomAttribute()
638
638
]
639
639
);
640
640
}
641
- $ this ->assertNotEmpty ($ response ['products ' ]['filters ' ],'filters is empty ' );
641
+ $ this ->assertNotEmpty ($ response ['products ' ]['filters ' ], 'filters is empty ' );
642
642
$ this ->assertNotEmpty ($ response ['products ' ]['aggregations ' ], 'Aggregations should not be empty ' );
643
643
$ this ->assertCount (3 , $ response ['products ' ]['aggregations ' ]);
644
644
@@ -1298,6 +1298,7 @@ public function testSearchAndSortByRelevance()
1298
1298
$ this ->assertNotEmpty ($ response ['products ' ]['filters ' ], 'Filters should have the Category layer ' );
1299
1299
$ this ->assertEquals ('Colorful Category ' , $ response ['products ' ]['filters ' ][0 ]['filter_items ' ][0 ]['label ' ]);
1300
1300
$ productsInResponse = ['ocean blue Shoes ' ,'Blue briefs ' ,'Navy Striped Shoes ' ,'Grey shorts ' ];
1301
+ // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
1301
1302
for ($ i = 0 ; $ i < count ($ response ['products ' ]['items ' ]); $ i ++) {
1302
1303
$ this ->assertEquals ($ productsInResponse [$ i ], $ response ['products ' ]['items ' ][$ i ]['name ' ]);
1303
1304
}
@@ -1553,6 +1554,7 @@ public function testFilterWithinASpecificPriceRangeSortedByPriceDESC()
1553
1554
//verify that by default Price and category are the only layers available
1554
1555
$ filterNames = ['Category ' , 'Price ' ];
1555
1556
$ this ->assertCount (2 , $ response ['products ' ]['filters ' ], 'Filter count does not match ' );
1557
+ // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
1556
1558
for ($ i = 0 ; $ i < count ($ response ['products ' ]['filters ' ]); $ i ++) {
1557
1559
$ this ->assertEquals ($ filterNames [$ i ], $ response ['products ' ]['filters ' ][$ i ]['name ' ]);
1558
1560
}
0 commit comments