Skip to content

Commit de18a5d

Browse files
author
Pascal Querner
committed
tests: add test cases
1 parent 8b4fb87 commit de18a5d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

+17-1
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,15 @@ public function envAsArrayDataProvider(): Generator
239239
],
240240
]
241241
];
242+
yield 'storeScope' => [
243+
[
244+
'env_path' => 'OPENMAGE_CONFIG__STORES__GERMAN__GENERAL__STORE_INFORMATION__NAME',
245+
'scope' => 'stores',
246+
'expected' => [
247+
'general/store_information/name' => 1,
248+
],
249+
]
250+
];
242251
yield 'invalidScope' => [
243252
[
244253
'env_path' => '',
@@ -270,13 +279,20 @@ public function testHasPath(array $config): void
270279

271280
public function envHasPathDataProvider(): Generator
272281
{
273-
yield 'hasPath' => [
282+
yield 'hasPath default' => [
274283
[
275284
'env_path' => 'OPENMAGE_CONFIG__DEFAULT__GENERAL__STORE_INFORMATION__NAME',
276285
'xml_path' => 'default/general/store_information/name',
277286
'expected' => true,
278287
]
279288
];
289+
yield 'hasPath store' => [
290+
[
291+
'env_path' => 'OPENMAGE_CONFIG__STORES__GERMAN__GENERAL__STORE_INFORMATION__NAME',
292+
'xml_path' => 'stores/general/store_information/name',
293+
'expected' => true,
294+
]
295+
];
280296
yield 'hasNotPath' => [
281297
[
282298
'env_path' => 'OPENMAGE_CONFIG__DEFAULT__GENERAL__STORE_INFORMATION__NAME',

0 commit comments

Comments
 (0)