Skip to content

Commit f5836a9

Browse files
Egor Shitikovslopukhov
authored andcommitted
MAGETWO-36326: Create fixture for changing indexers mode (on save/scheduled)
1 parent 2547720 commit f5836a9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

dev/tools/performance-toolkit/fixtures/indexers_apply.php renamed to dev/tools/performance-toolkit/fixtures/indexers_states_apply.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
/**
8-
* Class IndexersApplyFixture
8+
* Class IndexersStatesApplyFixture
99
*/
10-
class IndexersApplyFixture extends \Magento\ToolkitFramework\Fixture
10+
class IndexersStatesApplyFixture extends \Magento\ToolkitFramework\Fixture
1111
{
1212
/**
1313
* @var int
@@ -19,13 +19,11 @@ class IndexersApplyFixture extends \Magento\ToolkitFramework\Fixture
1919
*/
2020
public function execute()
2121
{
22-
$indexers = \Magento\ToolkitFramework\Config::getInstance()->getValue('indexers', array());
22+
$indexers = \Magento\ToolkitFramework\Config::getInstance()->getValue('indexers', []);
2323
$this->application->resetObjectManager();
24-
25-
foreach ($indexers["indexer"] as $indexer) {
26-
$this->application->indexersStates[$indexer['id']] = $indexer['set_scheduled'];
27-
}
28-
24+
foreach ($indexers["indexer"] as $indexer) {
25+
$this->application->indexersStates[$indexer['id']] = $indexer['set_scheduled'];
26+
}
2927
$this->application->getObjectManager()->get('Magento\Framework\App\CacheInterface')
3028
->clean([\Magento\Framework\App\Config::CACHE_TAG]);
3129
}
@@ -35,7 +33,7 @@ public function execute()
3533
*/
3634
public function getActionTitle()
3735
{
38-
return 'Indexer Mode Changes';
36+
return 'Indexers Mode Changes';
3937
}
4038

4139
/**
@@ -47,4 +45,4 @@ public function introduceParamLabels()
4745
}
4846
}
4947

50-
return new IndexersApplyFixture($this);
48+
return new IndexersStatesApplyFixture($this);

0 commit comments

Comments
 (0)