diff --git a/application/controllers/test.php b/application/controllers/test.php index 26dbcee..f6b7e29 100644 --- a/application/controllers/test.php +++ b/application/controllers/test.php @@ -8,19 +8,20 @@ * @copyright Copyright (C) 2010 Istvan Pusztai (twitter.com/istvanp) **/ -class Test extends Controller { +class Test extends CI_Controller { - var $timings = array(); - var $tests = array(); + private $timings = array(); + private $tests = array(); /** * Constructor function * * @return void **/ - function Test() + public function __construct() + { - parent::Controller(); + parent::__construct(); // Set time marker for the start of the test suite $this->benchmark->mark('first'); @@ -38,7 +39,7 @@ function Test() // Disable database debugging so we can test all units without stopping // at the first SQL error - $this->db->db_debug = FALSE; + // $this->db->db_debug = FALSE; // Create list of tests $this->_map_tests(); @@ -130,7 +131,7 @@ function user_model() * @author Istvan Pusztai * @return void **/ - function _remap() + public function _remap() { $view_data = array(); $action = $this->uri->rsegment(2); @@ -220,7 +221,7 @@ function _remap() * @author Istvan Pusztai * @return void **/ - function _map_tests() + public function _map_tests() { $methods = get_class_methods($this); natsort($methods); diff --git a/system/language/english/unit_test_lang.php b/application/language/chinese/unit_test_lang.php similarity index 100% rename from system/language/english/unit_test_lang.php rename to application/language/chinese/unit_test_lang.php diff --git a/application/language/dutch/unit_test_lang.php b/application/language/dutch/unit_test_lang.php new file mode 100644 index 0000000..39a4636 --- /dev/null +++ b/application/language/dutch/unit_test_lang.php @@ -0,0 +1,27 @@ +CI =& get_instance(); } diff --git a/application/views/unit_test.php b/application/views/unit_test.php index 7d45634..a035137 100644 --- a/application/views/unit_test.php +++ b/application/views/unit_test.php @@ -1,8 +1,9 @@ +load->helper('url');?> Unit Testing › <?=ucfirst($type)?> -" charset="utf-8"> +"> - 0): ?> + 0) { ?>
- - 0): ?> + + 0) { ?>
/ tests passed in seconds
- $test): - if (array_key_exists($key, $headings['types'])) - echo "

{$headings['types'][$key]}

\n"; - if (array_key_exists($key, $headings['tests'])) - echo "

{$headings['tests'][$key]}

\n"; + + $test) { + if (array_key_exists($key, $headings['types'])) + echo "

{$headings['types'][$key]}

\n"; + if (array_key_exists($key, $headings['tests'])) + echo "

{$headings['tests'][$key]}

\n"; ?>
@@ -57,22 +62,22 @@ Expected (), returned - + - + ()
- - + + - - + + - + on line
- + - + \ No newline at end of file