From fe5099a695c25e503a0aff6124644b9011a27e0d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 18 Mar 2015 12:35:47 +0200 Subject: Polish some recent changes in test cases --- tests/codeigniter/core/Input_test.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (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 d3f5a9048..159a877dc 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -134,15 +134,14 @@ class Input_test extends CI_TestCase { $this->assertEquals('bar', $foo); $this->assertEquals("Hello, i try to your site", $harm); $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless); - + $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['foo']['bar'] = 'baz'; - $barArray = array( 'bar' => 'baz' ); - + $barArray = array('bar' => 'baz'); + $this->assertEquals('baz', $this->input->post('foo[bar]')); $this->assertEquals($barArray, $this->input->post('foo[]')); $this->assertNull($this->input->post('foo[baz]')); - } // -------------------------------------------------------------------- @@ -222,5 +221,4 @@ class Input_test extends CI_TestCase { // Back to reality $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality } - -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b