|
7 | 7 | namespace Magento\Config\Console\Command;
|
8 | 8 |
|
9 | 9 | use Magento\Config\Model\Config\Backend\Admin\Custom;
|
| 10 | +use Magento\Config\Model\Config\Structure\Converter; |
| 11 | +use Magento\Config\Model\Config\Structure\Data as StructureData; |
10 | 12 | use Magento\Directory\Model\Currency;
|
11 | 13 | use Magento\Framework\App\Config\ConfigPathResolver;
|
12 | 14 | use Magento\Framework\App\Config\ScopeConfigInterface;
|
@@ -91,6 +93,8 @@ protected function setUp()
|
91 | 93 | {
|
92 | 94 | Bootstrap::getInstance()->reinitialize();
|
93 | 95 | $this->objectManager = Bootstrap::getObjectManager();
|
| 96 | + $this->extendSystemStructure(); |
| 97 | + |
94 | 98 | $this->scopeConfig = $this->objectManager->get(ScopeConfigInterface::class);
|
95 | 99 | $this->reader = $this->objectManager->get(FileReader::class);
|
96 | 100 | $this->filesystem = $this->objectManager->get(Filesystem::class);
|
@@ -123,6 +127,21 @@ protected function tearDown()
|
123 | 127 | $this->appConfig->reinit();
|
124 | 128 | }
|
125 | 129 |
|
| 130 | + /** |
| 131 | + * Add test system structure to main system structure |
| 132 | + * |
| 133 | + * @return void |
| 134 | + */ |
| 135 | + private function extendSystemStructure() |
| 136 | + { |
| 137 | + $document = new \DOMDocument(); |
| 138 | + $document->load(__DIR__ . '/../../_files/system.xml'); |
| 139 | + $converter = $this->objectManager->get(Converter::class); |
| 140 | + $systemConfig = $converter->convert($document); |
| 141 | + $structureData = $this->objectManager->get(StructureData::class); |
| 142 | + $structureData->merge($systemConfig); |
| 143 | + } |
| 144 | + |
126 | 145 | /**
|
127 | 146 | * @return array
|
128 | 147 | */
|
@@ -191,6 +210,8 @@ public function runLockDataProvider()
|
191 | 210 | ['general/region/display_all', '1'],
|
192 | 211 | ['general/region/state_required', 'BR,FR', ScopeInterface::SCOPE_WEBSITE, 'base'],
|
193 | 212 | ['admin/security/use_form_key', '0'],
|
| 213 | + ['general/group/subgroup/field', 'default_value'], |
| 214 | + ['general/group/subgroup/field', 'website_value', ScopeInterface::SCOPE_WEBSITE, 'base'], |
194 | 215 | ];
|
195 | 216 | }
|
196 | 217 |
|
|
0 commit comments