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:
parent
f3e28596c4
commit
a7b4808b32
1 changed files with 7 additions and 0 deletions
|
@ -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'));
|
||||
|
|
Loading…
Reference in a new issue