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