Skip to content

Commit 0b04489

Browse files
committed
test: fix setUp()
1 parent b220d60 commit 0b04489

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/system/HTTP/ResponseTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ final class ResponseTest extends CIUnitTestCase
3030

3131
protected function setUp(): void
3232
{
33+
$_SERVER = [];
34+
Services::reset();
35+
3336
parent::setUp();
34-
$this->server = $_SERVER;
3537
}
3638

3739
protected function tearDown(): void
3840
{
39-
$_SERVER = $this->server;
4041
Factories::reset('config');
4142
}
4243

tests/system/HTTP/URITest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ final class URITest extends CIUnitTestCase
2626
{
2727
protected function setUp(): void
2828
{
29+
$_SERVER = [];
30+
$_SERVER['SCRIPT_NAME'] = 'index.php';
31+
2932
parent::setUp();
3033
}
3134

0 commit comments

Comments
 (0)