diff options
author | David Woods <d.woods92@gmail.com> | 2015-03-17 04:00:21 +0100 |
---|---|---|
committer | David Woods <d.woods92@gmail.com> | 2015-03-17 04:00:21 +0100 |
commit | f3ac71ea74351dc075d95867612da46834eccdf3 (patch) | |
tree | 83768e9b878517dcee053af4b0838d1c82eb67cf /tests/codeigniter/libraries/Form_validation_test.php | |
parent | ff806f9157a4a9b32fb40d38ca2cab8130cf66d2 (diff) |
Created setup and construct for Form_Validation unit test
Signed-off-by: David Woods <d.woods92@gmail.com>
Diffstat (limited to 'tests/codeigniter/libraries/Form_validation_test.php')
-rw-r--r-- | tests/codeigniter/libraries/Form_validation_test.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php new file mode 100644 index 000000000..2a433af3d --- /dev/null +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -0,0 +1,35 @@ +<?php + +class Form_validation_test extends CI_TestCase { + + public function set_up() + { + // Create a mock loader since load->helper() looks in the wrong directories for unit tests, + // We'll use CI_TestCase->helper() instead + $ldr = $this->getMock('CI_Loader', array('helper')); + // At current, CI_Form_Validation only calls load->helper("form") + // Assert this so that if that changes this fails fast + $ldr->expects($this->once()) + ->method('helper') + ->with($this->equalTo('form')); + + $this->ci_instance_var('load', $ldr); + $this->helper('form'); + + } + + public function test___construct() + { + $this->form_validation = new CI_Form_validation(); + + $this->assertNotNull($this->form_validation); + } + + public function test__construct_rules() + { + + } + + public function test_ + +} |