Merge branch 'develop' into feature/stream

This commit is contained in:
Pierre Rudloff 2016-12-26 14:04:34 +01:00
commit b1ee9daab4

View file

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