Merge branch 'develop' into feature/stream
This commit is contained in:
commit
b1ee9daab4
1 changed files with 11 additions and 2 deletions
|
@ -27,6 +27,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->config = Config::getInstance('config_test.yml');
|
$this->config = Config::getInstance('config_test.yml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function tearDown()
|
||||||
|
{
|
||||||
|
Config::destroyInstance();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the getInstance function.
|
* Test the getInstance function.
|
||||||
*
|
*
|
||||||
|
@ -55,15 +60,19 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the getInstance function with the CONVERT environment variable.
|
* Test the getInstance function with the CONVERT and PYTHON environment variables.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGetInstanceWithEnv()
|
public function testGetInstanceWithEnv()
|
||||||
{
|
{
|
||||||
putenv('CONVERT=1');
|
|
||||||
Config::destroyInstance();
|
Config::destroyInstance();
|
||||||
|
putenv('CONVERT=1');
|
||||||
|
putenv('PYTHON=foo');
|
||||||
$config = Config::getInstance('config_test.yml');
|
$config = Config::getInstance('config_test.yml');
|
||||||
$this->assertEquals($config->convert, true);
|
$this->assertEquals($config->convert, true);
|
||||||
|
$this->assertEquals($config->python, 'foo');
|
||||||
|
putenv('CONVERT');
|
||||||
|
putenv('PYTHON');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue