summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Form_validation_test.php
blob: 2a433af3d103bd13549f3f333d4bedf846c32575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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_
    
}