fix(config): add envCache tests for getKeys()

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
pull/48099/head
Josh Richards 2024-06-26 10:16:26 +07:00 committed by backportbot[bot]
parent 2b484135be
commit cf752657ee
1 changed files with 7 additions and 0 deletions

@ -42,6 +42,13 @@ class ConfigTest extends TestCase {
$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'));