|
|
|
|
@ -52,6 +52,21 @@ class ConfigTest extends TestCase { |
|
|
|
|
$this->assertEquals('bar', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo=baz'); |
|
|
|
|
$this->assertEquals('baz', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo'); // unset the env variable |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function testGetValueReturnsEnvironmentValueIfSetToZero() { |
|
|
|
|
$this->assertEquals('bar', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo=0'); |
|
|
|
|
$this->assertEquals('0', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo'); // unset the env variable |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function testGetValueReturnsEnvironmentValueIfSetToFalse() { |
|
|
|
|
$this->assertEquals('bar', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo=false'); |
|
|
|
|
$this->assertEquals('false', $this->config->getValue('foo')); |
|
|
|
|
putenv('NC_foo'); // unset the env variable |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function testSetValue() { |
|
|
|
|
|