Unit Testing in CodeIgniter (Who use it?)
Posted in Snippets Ideas on August 28th, 2009 by admin – Be the first to commentUsing Unit tests is a best practice when developing software.
CodeIgniter has a Unit Testing class that is aimed to provide support for Unit Tests in your code.
Despite the CI Class for Unit Testing is quite simple, it may be very helpful to determine if what you are coding is exactly what you expect or not, by doing simple test cases.
I’d suggest to review their Unit Testing class.
The initialization of this library is quite simple simple, too. You just need to add the following line, and then the Unit Test object will be available using $this->unit.
$this->load->library('unit_test');
Once you loaded the library, you can start running simple tests. For each test, you specify the $test parameter (ie: 1+1), the expected result and the test name.
Also you can specify if a value is any of the available data types supported in the application, ie: is_string, is_bool, is_false, is_float, and so on, to evaluate if the result match with the expected data type.
Related searches:
- codeigniter unit testing
- class grouptest not found codeigniter
- ciunit codeigniter tutorial
- grouptest codeigniter
- fatal error: class \grouptest\ not found
- fatal error: class \group test\ not found on line 84
- fatal error: class \group test\ not found in /application/libraries/simpletester php on line 84
- fatal error class grouptest not found codeigniter
- codeigniter simpletester GroupTest Error
- codeigniter simpletest class \grouptest\ not found




