Skip to content

Commit 59ce16b

Browse files
author
Pascal Querner
committed
tests: add test cases
1 parent 4704318 commit 59ce16b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/unit/Mage/Core/Helper/EnvironmentConfigLoaderTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ public function envAsArrayDataProvider(): Generator
229229
],
230230
]
231231
];
232+
yield 'storeScope' => [
233+
[
234+
'env_path' => 'OPENMAGE_CONFIG__STORES__GERMAN__GENERAL__STORE_INFORMATION__NAME',
235+
'scope' => 'stores',
236+
'expected' => [
237+
'general/store_information/name' => 1,
238+
],
239+
]
240+
];
232241
yield 'invalidScope' => [
233242
[
234243
'env_path' => '',
@@ -260,13 +269,20 @@ public function testHasPath(array $config): void
260269

261270
public function envHasPathDataProvider(): Generator
262271
{
263-
yield 'hasPath' => [
272+
yield 'hasPath default' => [
264273
[
265274
'env_path' => 'OPENMAGE_CONFIG__DEFAULT__GENERAL__STORE_INFORMATION__NAME',
266275
'xml_path' => 'default/general/store_information/name',
267276
'expected' => true,
268277
]
269278
];
279+
yield 'hasPath store' => [
280+
[
281+
'env_path' => 'OPENMAGE_CONFIG__STORES__GERMAN__GENERAL__STORE_INFORMATION__NAME',
282+
'xml_path' => 'stores/general/store_information/name',
283+
'expected' => true,
284+
]
285+
];
270286
yield 'hasNotPath' => [
271287
[
272288
'env_path' => 'OPENMAGE_CONFIG__DEFAULT__GENERAL__STORE_INFORMATION__NAME',

0 commit comments

Comments
 (0)