forked from sjlu/CodeIgniter-Bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Unit testing
sjlu edited this page May 29, 2012
·
2 revisions
We made Unit Testing easy and pretty. The only thing you need to do is write your unit tests. To do so, go to application/models/unit_model.php and create the unit tests in the appropriate places. When you're done, all you need to do is call index.php/unit from your browser to generate a unit test report.
-
You need to place all your unit tests into
application/models/unit_model.php. -
Write your tests in the following manner in the function
retrieve_tests()$tests[] = array( 'rv' => $this->sendit_model->validate_email('tacticalazn@gmail.com'), 'ev' => true, 't' => 'validate_email("tacticalazn@gmail.com")', 'n' => 'Checking if email validation works.' );