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 30, 2018
1 parent 3b3dcd4 commit a7138bc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,11 @@ public function testCategoriesTree()

/**
* @magentoApiDataFixture Magento/Customer/_files/customer.php
* @magentoApiDataFixture Magento/Catalog/_files/categories.php
* @magentoApiDataFixture Magento/Catalog/_files/categories_indexed.php
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function testCategoryProducts()
{
/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
$categoryProductIndexer = $this->objectManager->get(
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
);
$categoryProductIndexer->reindexAll();

/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
$inventoryIndexer = $this->objectManager->get(
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
);
$inventoryIndexer->reindexAll();

$categoryId = 4;
$query = <<<QUERY
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

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();
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

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();

0 comments on commit a7138bc

Please sign in to comment.