summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Input_test.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php
index 21ff6d81f..d3f5a9048 100644
--- a/tests/codeigniter/core/Input_test.php
+++ b/tests/codeigniter/core/Input_test.php
@@ -134,6 +134,15 @@ 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&#40;'Hack'&#41;;[removed] your site", $harmless);
+
+ $_SERVER['REQUEST_METHOD'] = 'POST';
+ $_POST['foo']['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]'));
+
}
// --------------------------------------------------------------------