Skip to content

Commit a24b02f

Browse files
committed
MAGE-1050:code updated as per code review suggestions
1 parent bc7a29a commit a24b02f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Test/Integration/Search/SearchTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
class SearchTest extends TestCase
1111
{
12+
const BAGS_CATEGORY_ID = 4;
13+
1214
/** @var Product */
1315
protected $productIndexer;
1416

@@ -62,7 +64,7 @@ public function testCategorySearch()
6264
{
6365
// Get products by categoryId
6466
list($results, $totalHits, $facetsFromAlgolia) = $this->search('', 1, [
65-
'facetFilters' => ['categoryIds:' . $this->assertValues->expectedCategory]
67+
'facetFilters' => ['categoryIds:' . self::BAGS_CATEGORY_ID]
6668
]);
6769
// Category filter returns result
6870
$this->assertNotEmpty($results, "Category filter didn't return result");
@@ -72,7 +74,7 @@ public function testCategorySearch()
7274
->addAttributeToSelect('*')
7375
->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
7476
->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
75-
->addCategoriesFilter(["in" => $this->assertValues->expectedCategory])
77+
->addCategoriesFilter(["in" => self::BAGS_CATEGORY_ID])
7678
->setStore(1);
7779
// Products in category count matches
7880
$this->assertEquals(count($results), $collection->count(), "Indexed number of products in a category doesn't match with DB");

0 commit comments

Comments
 (0)