Skip to content

Commit 56b04ac

Browse files
MAGETWO-64226: Add paths validation
1 parent c1e93f1 commit 56b04ac

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
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
@@ -321,7 +321,7 @@ public function getFieldPathsByAttributeDataProvider()
321321
public function testGetFieldPaths()
322322
{
323323
$expected = [
324-
'config_path_2' => [
324+
'section/group/field2' => [
325325
'field_2'
326326
],
327327
'field_3' => [
@@ -333,7 +333,7 @@ public function testGetFieldPaths()
333333
'field_3_1_1' => [
334334
'field_3_1_1'
335335
],
336-
'config_path_4' => [
336+
'section/group/field4' => [
337337
'field_4',
338338
],
339339
'field_5' => [

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
'children' => [
3030
'field_2' => [
3131
'id' => 'field_2',
32-
'config_path' => 'config_path_2',
32+
'config_path' => 'section/group/field2',
3333
'translate' => 'label',
3434
'showInWebsite' => '1',
3535
'type' => 'text',
@@ -134,7 +134,7 @@
134134
],
135135
'field_4' => [
136136
'id' => 'field_4',
137-
'config_path' => 'config_path_4',
137+
'config_path' => 'section/group/field4',
138138
'translate' => 'label',
139139
'showInWebsite' => '1',
140140
'type' => 'text',

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<field id="field_2" translate="label" showInWebsite="1" type="text">
1919
<label>Field 2</label>
2020
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
21+
<config_path>section/group/field2</config_path>
2122
</field>
2223
</group>
2324
<group id="group_level_1" type="text">
@@ -70,7 +71,9 @@
7071
</attribute>
7172
<depends>
7273
<field id="field_3">0</field>
74+
7375
</depends>
76+
<config_path>section/group/field4</config_path>
7477
</field>
7578
<field id="field_5" translate="label" showInWebsite="1" type="text">
7679
<label></label>

0 commit comments

Comments
 (0)