aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/ConfigTest.php
diff options
context:
space:
mode:
authorJosh Richards <josh.t.richards@gmail.com>2024-06-26 10:16:26 -0400
committerJosh <josh.t.richards@gmail.com>2024-07-08 16:41:58 -0400
commit2ffff5146198b33724ccd8f1e9c9fa5cead54054 (patch)
treef0005eb82853feb6262b0297eba2b0dcb19fb108 /tests/lib/ConfigTest.php
parent62192ca57a01a11a12f7bc46140c455ab9742166 (diff)
downloadnextcloud-server-2ffff5146198b33724ccd8f1e9c9fa5cead54054.tar.gz
nextcloud-server-2ffff5146198b33724ccd8f1e9c9fa5cead54054.zip
fix(config): add envCache tests for getKeys()
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Diffstat (limited to 'tests/lib/ConfigTest.php')
-rw-r--r--tests/lib/ConfigTest.php7
1 files changed, 7 insertions, 0 deletions
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'));