aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-09-16 18:54:23 +0200
committerGitHub <noreply@github.com>2024-09-16 18:54:23 +0200
commit0a20c69c85cdf8f8b07bdb12b836752a32898304 (patch)
tree243704d7c7f31ad9fede3761b3d53746aa7de7d8 /tests
parent1c7b5c83ff391bd6e410937c5e1ac3b6d0e8c323 (diff)
parent75555d34b19d5eef96c4cc4fe2bd2033ad5ee6a5 (diff)
downloadnextcloud-server-0a20c69c85cdf8f8b07bdb12b836752a32898304.tar.gz
nextcloud-server-0a20c69c85cdf8f8b07bdb12b836752a32898304.zip
Merge pull request #48100 from nextcloud/backport/46140/stable29
[stable29] 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 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'));