aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJosh Richards <josh.t.richards@gmail.com>2024-06-26 10:16:26 -0400
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-16 15:06:03 +0000
commita7b4808b3286236ba777f55544ef0127bbb6b062 (patch)
tree7c5a942d228a7eff6f834520dcb68c20fe5beaf0 /tests
parentf3e28596c467ee2c30bab40b6799e23c6c1c9358 (diff)
downloadnextcloud-server-a7b4808b3286236ba777f55544ef0127bbb6b062.tar.gz
nextcloud-server-a7b4808b3286236ba777f55544ef0127bbb6b062.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.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'));