From 6eeec7c270ed07c04f7323321816e38364cc3ee5 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 19 Dec 2019 18:52:42 +0000 Subject: [PATCH] Fixed test added in #35022 --- src/Symfony/Component/Dotenv/Tests/DotenvTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php index 965f368643..43607d3555 100644 --- a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php +++ b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php @@ -320,9 +320,12 @@ class DotenvTest extends TestCase putenv('Foo=Bar'); $dotenv = new Dotenv(true); - $values = $dotenv->parse('Foo=${Foo}'); - $this->assertSame('Bar', $values['Foo']); - putenv('Foo'); + try { + $values = $dotenv->parse('Foo=${Foo}'); + $this->assertSame('Bar', $values['Foo']); + } finally { + putenv('Foo'); + } } }