From 2ffff5146198b33724ccd8f1e9c9fa5cead54054 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Wed, 26 Jun 2024 10:16:26 -0400 Subject: fix(config): add envCache tests for getKeys() Signed-off-by: Josh Richards --- tests/lib/ConfigTest.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/lib') diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index e65cf7633e1..e5d0c94003b 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -41,6 +41,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')); -- cgit v1.2.3