@@ -67,6 +67,18 @@ public function testExecute()
67
67
68
68
$ config = $ this ->reader ->loadConfigFile (ConfigFilePool::APP_CONFIG , $ this ->getFileName ());
69
69
70
+ $ this ->validateSystemSection ($ config );
71
+ $ this ->validateThemesSection ($ config );
72
+ }
73
+
74
+ /**
75
+ * Validates 'system' section in configuration data.
76
+ *
77
+ * @param array $config The configuration array
78
+ * @return void
79
+ */
80
+ private function validateSystemSection (array $ config )
81
+ {
70
82
$ this ->assertArrayHasKey (
71
83
'test_value_1 ' ,
72
84
$ config ['system ' ]['default ' ]['web ' ]['test ' ]
@@ -79,6 +91,61 @@ public function testExecute()
79
91
'test_sensitive ' ,
80
92
$ config ['system ' ]['default ' ]['web ' ]['test ' ]
81
93
);
94
+
95
+ }
96
+
97
+ /**
98
+ * Validates 'themes' section in configuration data.
99
+ *
100
+ * @param array $config The configuration array
101
+ * @return void
102
+ */
103
+ private function validateThemesSection (array $ config )
104
+ {
105
+ // Clearing the dynamic fields.
106
+ foreach (array_keys ($ config ['themes ' ]) as $ themeKey ) {
107
+ $ config ['themes ' ][$ themeKey ]['preview_image ' ] = null ;
108
+ }
109
+
110
+ $ this ->assertEquals (
111
+ [
112
+ 'parent_id ' => null ,
113
+ 'theme_path ' => 'Magento/backend ' ,
114
+ 'theme_title ' => 'Magento 2 backend ' ,
115
+ 'preview_image ' => null ,
116
+ 'is_featured ' => '0 ' ,
117
+ 'area ' => 'adminhtml ' ,
118
+ 'type ' => '0 ' ,
119
+ 'code ' => 'Magento/backend ' ,
120
+ ],
121
+ $ config ['themes ' ]['Magento/backend ' ]
122
+ );
123
+ $ this ->assertEquals (
124
+ [
125
+ 'parent_id ' => null ,
126
+ 'theme_path ' => 'Magento/blank ' ,
127
+ 'theme_title ' => 'Magento Blank ' ,
128
+ 'preview_image ' => null ,
129
+ 'is_featured ' => '0 ' ,
130
+ 'area ' => 'frontend ' ,
131
+ 'type ' => '0 ' ,
132
+ 'code ' => 'Magento/blank ' ,
133
+ ],
134
+ $ config ['themes ' ]['Magento/blank ' ]
135
+ );
136
+ $ this ->assertEquals (
137
+ [
138
+ 'parent_id ' => 'Magento/blank ' ,
139
+ 'theme_path ' => 'Magento/luma ' ,
140
+ 'theme_title ' => 'Magento Luma ' ,
141
+ 'preview_image ' => null ,
142
+ 'is_featured ' => '0 ' ,
143
+ 'area ' => 'frontend ' ,
144
+ 'type ' => '0 ' ,
145
+ 'code ' => 'Magento/luma ' ,
146
+ ],
147
+ $ config ['themes ' ]['Magento/luma ' ]
148
+ );
82
149
}
83
150
84
151
public function tearDown ()
0 commit comments