File tree 1 file changed +12
-2
lines changed
src/Symfony/Component/Dotenv/Tests
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,13 @@ public function getEnvData()
148
148
149
149
public function testLoad ()
150
150
{
151
+ unset($ _ENV ['FOO ' ]);
152
+ unset($ _ENV ['BAR ' ]);
153
+ unset($ _SERVER ['FOO ' ]);
154
+ unset($ _SERVER ['BAR ' ]);
155
+ putenv ('FOO ' );
156
+ putenv ('BAR ' );
157
+
151
158
@mkdir ($ tmpdir = sys_get_temp_dir ().'/dotenv ' );
152
159
153
160
$ path1 = tempnam ($ tmpdir , 'sf- ' );
@@ -158,14 +165,17 @@ public function testLoad()
158
165
159
166
(new DotEnv ())->load ($ path1 , $ path2 );
160
167
<
8000
/td>
161
- $ this -> assertSame ( ' BAR ' , getenv ('FOO ' ) );
162
- $ this -> assertSame ( ' BAZ ' , getenv ('BAR ' ) );
168
+ $ foo = getenv ('FOO ' );
169
+ $ bar = getenv ('BAR ' );
163
170
164
171
putenv ('FOO ' );
165
172
putenv ('BAR ' );
166
173
unlink ($ path1 );
167
174
unlink ($ path2 );
168
175
rmdir ($ tmpdir );
176
+
177
+ $ this ->assertSame ('BAR ' , $ foo );
178
+ $ this ->assertSame ('BAZ ' , $ bar );
169
179
}
170
180
171
181
/**
<
2A66
/div>
You can’t perform that action at this time.
0 commit comments