From 87928371de8a316c9880a451fae04d9785c32840 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 14 Sep 2021 13:47:31 +0300 Subject: Merge pull request #6045 from gxgpet/develop_fixtravis Fixes Travis pipeline. Adding PHPUnit 8. --- tests/codeigniter/core/Input_test.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/codeigniter/core/Input_test.php') diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index 976941d41..3cce00414 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -22,6 +22,14 @@ class Input_test extends CI_TestCase { // -------------------------------------------------------------------- + public function tear_down() + { + $_POST = []; + $_GET = []; + } + + // -------------------------------------------------------------------- + public function test_get_not_exists() { $this->assertSame(array(), $this->input->get()); @@ -136,7 +144,7 @@ class Input_test extends CI_TestCase { $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless); $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo']['bar'] = 'baz'; + $_POST['foo'] = array('bar' => 'baz'); $barArray = array('bar' => 'baz'); $this->assertEquals('baz', $this->input->post('foo[bar]')); -- cgit v1.2.3-24-g4f1b