diff options
author | Josh Richards <josh.t.richards@gmail.com> | 2024-06-26 10:16:26 -0400 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-09-16 14:57:26 +0000 |
commit | 80bbffa78a7c826493f8a68439f467a26780477b (patch) | |
tree | 5a0ea5588cdd6299d70c654b938dc0c7b72a9941 /tests | |
parent | 4b9a74658dddae9bdd1757f5a88f932316c21cd0 (diff) | |
download | nextcloud-server-80bbffa78a7c826493f8a68439f467a26780477b.tar.gz nextcloud-server-80bbffa78a7c826493f8a68439f467a26780477b.zip |
fix(config): add envCache tests for getKeys()
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/ConfigTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index 7c289472abd..22860f6f130 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -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')); |