aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-09-16 16:55:13 +0200
committerGitHub <noreply@github.com>2024-09-16 16:55:13 +0200
commitd9c5512878c28a4483116969e2ca77cce0131257 (patch)
tree8e21ae98e5f718c82aeb55980041b12b575a6ff7 /tests
parent6eefcdba0c4c239b027dfd7d6a2e9a5ef54e18b9 (diff)
parent13088b745a7b3cd0d81aae63c0c1ff9028cafbf6 (diff)
downloadnextcloud-server-d9c5512878c28a4483116969e2ca77cce0131257.tar.gz
nextcloud-server-d9c5512878c28a4483116969e2ca77cce0131257.zip
Merge pull request #46140 from nextcloud/fix-nc-env-inclusion
fix(config): Add missing handling for `envCache` in `getKeys()`
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 60006aa43de..94ee8da5dec 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(): void {
$config = $this->getConfig();
$this->assertSame('bar', $config->getValue('foo'));