Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Commit

Permalink
ENGCOM-1663: Include 'products' in category query #48
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Paliarush committed May 31, 2018
1 parent a7138bc commit 8e8d0d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

include __DIR__ . '/categories.php';

$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();

/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
$categoryProductIndexer = $objectManager->get(
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
);
$categoryProductIndexer->reindexAll();

/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
$inventoryIndexer = $objectManager->get(
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
);
$inventoryIndexer->reindexAll();
/** @var \Magento\Indexer\Model\Indexer\CollectionFactory $indexerCollectionFactory */
$indexerCollectionFactory = $objectManager->get(\Magento\Indexer\Model\Indexer\CollectionFactory::class);
$indexerCollection = $indexerCollectionFactory->create();
$indexers = $indexerCollection->getItems();
foreach ($indexers as $indexer) {
$indexer->reindexAll();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

include __DIR__ . '/categories_rollback.php';

$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();

/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
$categoryProductIndexer = $objectManager->get(
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
);
$categoryProductIndexer->reindexAll();

/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
$inventoryIndexer = $objectManager->get(
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
);
$inventoryIndexer->reindexAll();
/** @var \Magento\Indexer\Model\Indexer\CollectionFactory $indexerCollectionFactory */
$indexerCollectionFactory = $objectManager->get(\Magento\Indexer\Model\Indexer\CollectionFactory::class);
$indexerCollection = $indexerCollectionFactory->create();
$indexers = $indexerCollection->getItems();
foreach ($indexers as $indexer) {
$indexer->reindexAll();
}

0 comments on commit 8e8d0d2

Please sign in to comment.