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 <[email protected]>
  • Loading branch information
joshtrichards committed Jun 27, 2024
1 parent e6f60a9 commit 6ff093d
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 6ff093d

Please sign in to comment.