Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 035d526 commit dabecdeCopy full SHA for dabecde
src/Symfony/Component/Dotenv/Tests/DotenvTest.php
@@ -146,6 +146,28 @@ public function getEnvData()
146
return $tests;
147
}
148
149
+ public function testLoad()
150
+ {
151
+ @mkdir($tmpdir = sys_get_temp_dir().'/dotenv');
152
+
153
+ $path1 = tempnam($tmpdir, 'sf-');
154
+ $path2 = tempnam($tmpdir, 'sf-');
155
156
+ file_put_contents($path1, 'FOO=BAR');
157
+ file_put_contents($path2, 'BAR=BAZ');
158
159
+ (new DotEnv())->load($path1, $path2);
160
161
+ $this->assertSame('BAR', getenv('FOO'));
162
+ $this->assertSame('BAZ', getenv('BAR'));
163
164
+ putenv('FOO');
165
+ putenv('BAR');
166
+ unlink($path1);
167
+ unlink($path2);
168
+ rmdir($tmpdir);
169
+ }
170
171
/**
172
* @expectedException \Symfony\Component\Dotenv\Exception\PathException
173
*/
0 commit comments