diff options
author | Andrey Andreev <narf@devilix.net> | 2016-03-12 10:40:34 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-03-12 10:40:34 +0100 |
commit | 7243d0b9019eec108255fae5b7eaf08a14a8092e (patch) | |
tree | a1b7e01a0e53badef4acff6e197e4503deded55e /tests | |
parent | 1719223f936c1f202b176ebeba7718f6b24e4886 (diff) |
Fix #4516
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/libraries/Form_validation_test.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index f455b9146..3537eb355 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -28,6 +28,16 @@ class Form_validation_test extends CI_TestCase { $this->form_validation = new CI_Form_validation(); } + public function test_empty_array_input() + { + $this->assertFalse( + $this->run_rules( + array(array('field' => 'foo', 'label' => 'Foo Label', 'rules' => 'required')), + array('foo' => array()) + ) + ); + } + public function test_rule_required() { $rules = array(array('field' => 'foo', 'label' => 'foo_label', 'rules' => 'required')); |