-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LYNX-63: Refactored tests for ProductAttributeFilterInput of products…
… query in CatalogGraphQl module (#82) * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Fix static test in ProductSearchTest.php * LYNX-63: Fix for Product Search test with search suggestions * LYNX-63: Fixture for Indexer
- Loading branch information
Showing
2 changed files
with
169 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Indexer\Test\Fixture; | ||
|
||
use Magento\Framework\DataObject; | ||
use Magento\TestFramework\Fixture\DataFixtureInterface; | ||
use Magento\Indexer\Model\Indexer as IndexerModel; | ||
use Magento\Indexer\Model\Indexer\Collection; | ||
|
||
class Indexer implements DataFixtureInterface | ||
{ | ||
/** | ||
* @var Collection | ||
*/ | ||
private Collection $indexerCollection; | ||
|
||
/** | ||
* @param Collection $indexerCollection | ||
*/ | ||
public function __construct( | ||
Collection $indexerCollection | ||
) { | ||
$this->indexerCollection = $indexerCollection; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @param array $data Parameters | ||
*/ | ||
public function apply(array $data = []): ?DataObject | ||
{ | ||
$this->indexerCollection->load(); | ||
/** @var IndexerModel $indexer */ | ||
foreach ($this->indexerCollection->getItems() as $indexer) { | ||
$indexer->reindexAll(); | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters