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

Commit a7138bc

Browse files
author
Alex Paliarush
committed
ENGCOM-1663: Include 'products' in category query #48
1 parent 3b3dcd4 commit a7138bc

File tree

3 files changed

+43
-13
lines changed

3 files changed

+43
-13
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,11 @@ public function testCategoriesTree()
115115

116116
/**
117117
* @magentoApiDataFixture Magento/Customer/_files/customer.php
118-
* @magentoApiDataFixture Magento/Catalog/_files/categories.php
118+
* @magentoApiDataFixture Magento/Catalog/_files/categories_indexed.php
119119
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
120120
*/
121121
public function testCategoryProducts()
122122
{
123-
/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
124-
$categoryProductIndexer = $this->objectManager->get(
125-
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
126-
);
127-
$categoryProductIndexer->reindexAll();
128-
129-
/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
130-
$inventoryIndexer = $this->objectManager->get(
131-
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
132-
);
133-
$inventoryIndexer->reindexAll();
134-
135123
$categoryId = 4;
136124
$query = <<<QUERY
137125
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
include __DIR__ . '/categories.php';
8+
9+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
10+
11+
/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
12+
$categoryProductIndexer = $objectManager->get(
13+
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
14+
);
15+
$categoryProductIndexer->reindexAll();
16+
17+
/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
18+
$inventoryIndexer = $objectManager->get(
19+
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
20+
);
21+
$inventoryIndexer->reindexAll();
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
include __DIR__ . '/categories_rollback.php';
8+
9+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
10+
11+
/** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */
12+
$categoryProductIndexer = $objectManager->get(
13+
\Magento\Catalog\Model\Indexer\Category\Product\Processor::class
14+
);
15+
$categoryProductIndexer->reindexAll();
16+
17+
/** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */
18+
$inventoryIndexer = $objectManager->get(
19+
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
20+
);
21+
$inventoryIndexer->reindexAll();

0 commit comments

Comments
 (0)