Skip to content

Commit f30a06a

Browse files
committed
Refactoring config fixtures
1 parent 5e6c595 commit f30a06a

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

app/code/Magento/Config/Test/Unit/Model/Config/StructureTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ public function getFieldPaths(): array
502502
],
503503
'field_5' => [
504504
'field_5',
505-
],
506-
'section_3' => ['section_3']
505+
'field_5'
506+
]
507507
]
508508
]
509509
];

app/code/Magento/Config/Test/Unit/Model/_files/converted_config.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
'id' => 'field_3_1_1',
7676
'translate' => 'label',
7777
'showInWebsite' => '1',
78-
'backend_model' => \Magento\Config\Model\Config\Backend\Encrypted::class,
78+
'backend_model' =>
79+
\Magento\Config\Model\Config\Backend\Encrypted::class,
7980
'type' => 'text',
8081
'label' => 'Field 3.1.1',
8182
'_elementType' => 'field',
@@ -192,9 +193,26 @@
192193
'section_3' => [
193194
'id' => 'section_3',
194195
'type' => 'text',
195-
'tab' => 'tab_1',
196-
'_elementType' => 'field'
197-
],
196+
'_elementType' => 'section',
197+
'children' => [
198+
'group_5' => [
199+
'id' => 'group_5',
200+
'type' => 'text',
201+
'showInDefault' => 1,
202+
'showInWebsite' => 1,
203+
'showInStore' => 1,
204+
'_elementType' => 'group',
205+
'children' => [
206+
'field_5' => [
207+
'id' => 'field_5',
208+
'showInWebsite' => '1',
209+
'type' => 'text',
210+
'_elementType' => 'field',
211+
]
212+
]
213+
]
214+
]
215+
]
198216
],
199217
],
200218
],

app/code/Magento/Config/Test/Unit/Model/_files/system_2.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,11 @@
8686
</depends>
8787
</group>
8888
</section>
89+
<section id="section_3" type="text">
90+
<group id="group_5" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
91+
<field id="field_5" showInWebsite="1" type="text">
92+
</field>
93+
</group>
94+
</section>
8995
</system>
9096
</config>

0 commit comments

Comments
 (0)