Skip to content

Commit cdaae63

Browse files
committed
test: clear super globals after testing
The following test failed. It depends global state. 1) CodeIgniter\HTTP\ResponseTest::testSetLink Failed asserting that two strings are identical.
1 parent 44db72b commit cdaae63

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/system/Filters/InvalidCharsTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ protected function setUp(): void
4646
$this->invalidChars = new InvalidChars();
4747
}
4848

49+
protected function tearDown(): void
50+
{
51+
parent::tearDown();
52+
53+
$_GET = [];
54+
$_POST = [];
55+
$_COOKIE = [];
56+
}
57+
4958
private function createRequest(): IncomingRequest
5059
{
5160
$config = new MockAppConfig();

0 commit comments

Comments
 (0)