diff options
author | Andrey Andreev <narf@devilix.net> | 2015-03-18 11:35:47 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-03-18 11:35:47 +0100 |
commit | fe5099a695c25e503a0aff6124644b9011a27e0d (patch) | |
tree | d9fe18a4adaf8dd8e260462f58d37038c279b7b1 /tests/codeigniter/core/Input_test.php | |
parent | 35514731f05c749526939de4812f5288ff3cc007 (diff) |
Polish some recent changes in test cases
Diffstat (limited to 'tests/codeigniter/core/Input_test.php')
-rw-r--r-- | tests/codeigniter/core/Input_test.php | 10 |
1 files changed, 4 insertions, 6 deletions
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 <script>alert('Hack');</script> 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 +} |