Skip to content

Commit 8867f87

Browse files
MAGETWO-63231: Implementation
1 parent 6e2dca4 commit 8867f87

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

dev/tests/integration/testsuite/Magento/Deploy/Console/Command/App/ApplicationDumpCommandTest.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ public function testExecute()
6767

6868
$config = $this->reader->loadConfigFile(ConfigFilePool::APP_CONFIG, $this->getFileName());
6969

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+
{
7082
$this->assertArrayHasKey(
7183
'test_value_1',
7284
$config['system']['default']['web']['test']
@@ -79,6 +91,61 @@ public function testExecute()
7991
'test_sensitive',
8092
$config['system']['default']['web']['test']
8193
);
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+
);
82149
}
83150

84151
public function tearDown()

0 commit comments

Comments
 (0)