0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-24 08:56:48 +00:00

fix(config): add envCache tests for getKeys()

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
This commit is contained in:
Josh Richards 2024-06-26 10:16:26 -04:00 committed by backportbot[bot]
parent f3e28596c4
commit a7b4808b32

View file

@ -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'));