From 6d1a76e998fbd98d911006bd717660286a44331d Mon Sep 17 00:00:00 2001 From: Quynh Xuan Nguyen Date: Tue, 7 May 2019 16:02:05 +0700 Subject: [PATCH] Test do not use putenv --- src/Symfony/Component/Dotenv/Tests/DotenvTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php index ded78faaa7..63039d5660 100644 --- a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php +++ b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php @@ -431,4 +431,14 @@ class DotenvTest extends TestCase $dotenv = new Dotenv(false); $this->assertInstanceOf(Dotenv::class, $dotenv); } + + public function testDoNotUsePutenv() + { + $dotenv = new Dotenv(false); + $dotenv->populate(['TEST_USE_PUTENV' => 'no']); + + $this->assertSame('no', $_SERVER['TEST_USE_PUTENV']); + $this->assertSame('no', $_ENV['TEST_USE_PUTENV']); + $this->assertFalse(getenv('TEST_USE_PUTENV')); + } }