Skip to content

Commit d2ad717

Browse files
author
Roman Ganin
committed
Merge remote-tracking branch 'origin/MAGETWO-34014' into MAGETWO-30686
2 parents 48170ad + f8b102f commit d2ad717

File tree

7 files changed

+113
-108
lines changed

7 files changed

+113
-108
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/**
8+
* Class ConfigsApplyFixture
9+
*/
10+
class ConfigsApplyFixture extends \Magento\ToolkitFramework\Fixture
11+
{
12+
/**
13+
* @var int
14+
*/
15+
protected $priority = 150;
16+
17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public function execute()
21+
{
22+
$configs = \Magento\ToolkitFramework\Config::getInstance()->getValue('configs', array());
23+
$this->application->resetObjectManager();
24+
25+
foreach ($configs['config'] as $config) {
26+
/**
27+
* @var \Magento\Framework\App\Config\Value $configData
28+
*/
29+
$configData = $this->application->getObjectManager()->create('Magento\Framework\App\Config\Value');
30+
$configData->setPath($config['path'])
31+
->setScope($config['scope'])
32+
->setScopeId($config['scopeId'])
33+
->setValue($config['value'])
34+
->save();
35+
}
36+
$this->application->getObjectManager()->get('Magento\Framework\App\CacheInterface')
37+
->clean([\Magento\Framework\App\Config::CACHE_TAG]);
38+
}
39+
40+
/**
41+
* {@inheritdoc}
42+
*/
43+
public function getActionTitle()
44+
{
45+
return 'Config Changes';
46+
}
47+
48+
/**
49+
* {@inheritdoc}
50+
*/
51+
public function introduceParamLabels()
52+
{
53+
return [];
54+
}
55+
}
56+
57+
return new ConfigsApplyFixture($this);

dev/tools/performance-toolkit/fixtures/disable_form_key_usage.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

dev/tools/performance-toolkit/fixtures/shipping_flatrate_enabled.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

dev/tools/performance-toolkit/profiles/ce/extra_large.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,19 @@
1818
<cart_price_rules>100</cart_price_rules> <!-- Number of shopping cart price rules -->
1919
<cart_price_rules_floor>5</cart_price_rules_floor> <!-- The price rule condition: minimum products amount in shopping cart for price rule to be applied -->
2020
<customers>5000</customers> <!-- Number of customers to generate -->
21+
<configs> <!-- Config variables and values for change -->
22+
<config>
23+
<path>admin/security/use_form_key</path>
24+
<scope>default</scope>
25+
<scopeId>0</scopeId>
26+
<value>0</value>
27+
</config>
28+
<config>
29+
<path>carriers/flatrate/active</path>
30+
<scope>default</scope>
31+
<scopeId>0</scopeId>
32+
<value>1</value>
33+
</config>
34+
</configs>
2135
</profile>
2236
</config>

dev/tools/performance-toolkit/profiles/ce/large.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,19 @@
1818
<cart_price_rules>50</cart_price_rules> <!-- Number of shopping cart price rules -->
1919
<cart_price_rules_floor>2</cart_price_rules_floor> <!-- The price rule condition: minimum products amount in shopping cart for price rule to be applied -->
2020
<customers>2000</customers> <!-- Number of customers to generate -->
21+
<configs> <!-- Config variables and values for change -->
22+
<config>
23+
<path>admin/security/use_form_key</path>
24+
<scope>default</scope>
25+
<scopeId>0</scopeId>
26+
<value>0</value>
27+
</config>
28+
<config>
29+
<path>carriers/flatrate/active</path>
30+
<scope>default</scope>
31+
<scopeId>0</scopeId>
32+
<value>1</value>
33+
</config>
34+
</configs>
2135
</profile>
2236
</config>

dev/tools/performance-toolkit/profiles/ce/medium.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,19 @@
1818
<cart_price_rules>20</cart_price_rules> <!-- Number of shopping cart price rules -->
1919
<cart_price_rules_floor>2</cart_price_rules_floor> <!-- The price rule condition: minimum products amount in shopping cart for price rule to be applied -->
2020
<customers>200</customers> <!-- Number of customers to generate -->
21+
<configs> <!-- Config variables and values for change -->
22+
<config>
23+
<path>admin/security/use_form_key</path>
24+
<scope>default</scope>
25+
<scopeId>0</scopeId>
26+
<value>0</value>
27+
</config>
28+
<config>
29+
<path>carriers/flatrate/active</path>
30+
<scope>default</scope>
31+
<scopeId>0</scopeId>
32+
<value>1</value>
33+
</config>
34+
</configs>
2135
</profile>
2236
</config>

dev/tools/performance-toolkit/profiles/ce/small.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,19 @@
1818
<cart_price_rules>10</cart_price_rules> <!-- Number of shopping cart price rules -->
1919
<cart_price_rules_floor>2</cart_price_rules_floor> <!-- The price rule condition: minimum products amount in shopping cart for price rule to be applied -->
2020
<customers>20</customers> <!-- Number of customers to generate -->
21+
<configs> <!-- Config variables and values for change -->
22+
<config>
23+
<path>admin/security/use_form_key</path>
24+
<scope>default</scope>
25+
<scopeId>0</scopeId>
26+
<value>0</value>
27+
</config>
28+
<config>
29+
<path>carriers/flatrate/active</path>
30+
<scope>default</scope>
31+
<scopeId>0</scopeId>
32+
<value>1</value>
33+
</config>
34+
</configs>
2135
</profile>
2236
</config>

0 commit comments

Comments
 (0)