Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6eeec7c

Browse files
GrahamCampbellnicolas-grekas
authored andcommitted
Fixed test added in #35022
1 parent 135c6f7 commit 6eeec7c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Symfony/Component/Dotenv/Tests/DotenvTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,12 @@ public function testGetVariablesValueFromGetenv()
320320
putenv('Foo=Bar');
321321

322322
$dotenv = new Dotenv(true);
323-
$values = $dotenv->parse('Foo=${Foo}');
324-
$this->assertSame('Bar', $values['Foo']);
325323

326-
putenv('Foo');
324+
try {
325+
$values = $dotenv->parse('Foo=${Foo}');
326+
$this->assertSame('Bar', $values['Foo']);
327+
} finally {
328+
putenv('Foo');
329+
}
327330
}
328331
}

0 commit comments

Comments
 (0)