Skip to content

Commit

Permalink
fix(config): add envCache tests for getKeys()
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed Jun 26, 2024
1 parent 642211a commit 2102001
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/lib/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public function testGetKeys() {
$this->assertSame($expectedConfig, $this->getConfig()->getKeys());
}

public function testGetKeysReturnsEnvironmentKeysIfSet() {
$expectedConfig = ['foo', 'beers', 'alcohol_free', 'taste'];
putenv('NC_taste=great');
$this->assertSame($expectedConfig, $this->getConfig()->getKeys());
putenv('NC_taste');
}

public function testGetValue() {
$config = $this->getConfig();
$this->assertSame('bar', $config->getValue('foo'));
Expand Down

0 comments on commit 2102001

Please sign in to comment.