summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-10-20 12:40:57 +0200
committerAndrey Andreev <narf@devilix.net>2016-10-20 12:40:57 +0200
commit5d05372f4f59d27fdd93249d813970fcf181a4af (patch)
tree2b82203f66babc12017eb6b9f350502e2aa5d085 /tests
parent34fe402ea28e928865ec15242e8f20f760b7a334 (diff)
FV: throw BadMethodCallException when set_rules() called without
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/libraries/Form_validation_test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php
index 0815300e6..5f4bb9316 100644
--- a/tests/codeigniter/libraries/Form_validation_test.php
+++ b/tests/codeigniter/libraries/Form_validation_test.php
@@ -435,6 +435,12 @@ class Form_validation_test extends CI_TestCase {
$this->assertFalse($form_validation->run('fail'));
}
+ public function test_set_rules_exception()
+ {
+ $this->setExpectedException('BadMethodCallException');
+ $this->form_validation->set_rules('foo', 'bar');
+ }
+
public function test_has_rule()
{
$this->form_validation->reset_validation();