Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit c472c16

Browse files
committed
Fixed README, started enhanced tests
1 parent 38bc0ec commit c472c16

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Here you get a static factory which is able to produce three types of configurat
2626
Available types are:
2727
* ConfigDefault - basic config object, stores the yaml content "as is", provides get/set.
2828
* ConfigEnv - provides the possibility to get an environment-merged config. Based on the currently provided env, you'll have e.g. prod -> dev merged, with prod node as a master.
29-
* ConfigEnvExtended - same as ConfigEnv, adds the possibility to have "default" node on env-level, which will be the merge-base before prod. Merge: default -> prod -> $env
3029
* ConfigTimer is a specialised for of config to provide pre-generated DateTime objects for the Timer class.
3130

3231
Configs now also support the "imports" syntax from symfony configs.
@@ -35,8 +34,8 @@ Configs now also support the "imports" syntax from symfony configs.
3534
imports:
3635
- { resource: defaults.yml }
3736
```
38-
39-
Imported configs will be treated just like the "default" node and become the base for merging.
37+
There is the possibility to use a "default" node in all configs, except timers, which will be used as merge-base.
38+
Imported configs will be treated just like the "default" node and also become the base for merging.
4039
The order of merges is import -> default -> prod -> $env.
4140

4241
### Timer

Tests/Config/ConfigDefaultTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,22 @@ public function testFactory()
3636
);
3737

3838
$this->assertInstanceOf('Asm\Config\ConfigDefault', $config);
39+
40+
return $config;
3941
}
42+
43+
/**
44+
* @depends testFactory
45+
* @param ConfigDefault $config
46+
*/
47+
/*public function testImport($config)
48+
{
49+
$this->assertEquals(
50+
[
51+
'default' => 'yaddayadda',
52+
'my_test' => 'is testing hard'
53+
],
54+
$config->get('testkey_5')
55+
);
56+
}*/
4057
}

0 commit comments

Comments
 (0)