From c490a3f09252c52c5ba99b38efb4e7769cce4f0f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 26 Dec 2016 14:04:18 +0100 Subject: [PATCH] Add some missing tests --- tests/ConfigTest.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index d952cad..58a404b 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -27,6 +27,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->config = Config::getInstance('config_test.yml'); } + protected function tearDown() + { + Config::destroyInstance(); + } + /** * 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 */ public function testGetInstanceWithEnv() { - putenv('CONVERT=1'); Config::destroyInstance(); + putenv('CONVERT=1'); + putenv('PYTHON=foo'); $config = Config::getInstance('config_test.yml'); $this->assertEquals($config->convert, true); + $this->assertEquals($config->python, 'foo'); + putenv('CONVERT'); + putenv('PYTHON'); } }