Public Member Functions | |
CI_Unit_test () | |
run ($test, $expected=TRUE, $test_name= 'undefined') | |
report ($result=array()) | |
use_strict ($state=TRUE) | |
active ($state=TRUE) | |
result ($results=array()) | |
set_template ($template) | |
_backtrace () | |
_default_template () | |
_parse_template () | |
Public Attributes | |
$active = TRUE | |
$results = array() | |
$strict = FALSE | |
$_template = NULL | |
$_template_rows = NULL |
CI_Unit_test::_backtrace | ( | ) |
Generate a backtrace
This lets us show file names and line numbers
private
CI_Unit_test::_default_template | ( | ) |
Get Default Template
private
CI_Unit_test::_parse_template | ( | ) |
Parse Template
Harvests the data within the template {pseudo-variables}
private
CI_Unit_test::active | ( | $ | state = TRUE |
) |
Make Unit testing active
Enables/disables unit testing
public
bool |
CI_Unit_test::CI_Unit_test | ( | ) |
CI_Unit_test::report | ( | $ | result = array() |
) |
Generate a report
Displays a table with the test data
public
CI_Unit_test::result | ( | $ | results = array() |
) |
Result Array
Returns the raw result data
public
CI_Unit_test::run | ( | $ | test, | |
$ | expected = TRUE , |
|||
$ | test_name = 'undefined' | |||
) |
Run the tests
Runs the supplied tests
public
mixed | ||
mixed | ||
string |
CI_Unit_test::set_template | ( | $ | template | ) |
Set the template
This lets us set the template to be used to display results
public
string |
CI_Unit_test::use_strict | ( | $ | state = TRUE |
) |
Use strict comparison
Causes the evaluation to use === rather than ==
public
bool |
CI_Unit_test::$_template = NULL |
CI_Unit_test::$_template_rows = NULL |
CI_Unit_test::$active = TRUE |
CI_Unit_test::$results = array() |
CI_Unit_test::$strict = FALSE |