Skip to content

Commit 2ffff51

Browse files
committed
fix(config): add envCache tests for getKeys()
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
1 parent 62192ca commit 2ffff51

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/lib/ConfigTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public function testGetKeys() {
4141
$this->assertSame($expectedConfig, $this->getConfig()->getKeys());
4242
}
4343

44+
public function testGetKeysReturnsEnvironmentKeysIfSet() {
45+
$expectedConfig = ['foo', 'beers', 'alcohol_free', 'taste'];
46+
putenv('NC_taste=great');
47+
$this->assertSame($expectedConfig, $this->getConfig()->getKeys());
48+
putenv('NC_taste');
49+
}
50+
4451
public function testGetValue() {
4552
$config = $this->getConfig();
4653
$this->assertSame('bar', $config->getValue('foo'));

0 commit comments

Comments
 (0)