Skip to content

Commit d8cf84a

Browse files
committed
test: change the order of codes
1 parent 3e06eaf commit d8cf84a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/system/HTTP/MessageTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,18 @@ public function testSetHeaderWithExistingArrayValuesAppendNullValue()
240240

241241
public function testPopulateHeadersWithoutContentType()
242242
{
243-
// fail path, if the CONTENT_TYPE doesn't exist
244243
$original = $_SERVER;
245-
$_SERVER = ['HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.50'];
246244
$originalEnv = getenv('CONTENT_TYPE');
245+
246+
// fail path, if the CONTENT_TYPE doesn't exist
247+
$_SERVER = ['HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.50'];
247248
putenv('CONTENT_TYPE');
248249

249250
$this->message->populateHeaders();
250251

251252
$this->assertNull($this->message->header('content-type'));
252-
putenv("CONTENT_TYPE={$originalEnv}");
253253

254+
putenv("CONTENT_TYPE={$originalEnv}");
254255
$_SERVER = $original; // restore so code coverage doesn't break
255256
}
256257

0 commit comments

Comments
 (0)