summaryrefslogtreecommitdiffstats
path: root/system/libraries/Unit_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-24 13:55:35 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-24 13:55:35 +0200
commit5fd3ae8d33a4f5d3159b86683b9a670e973a63f5 (patch)
treee9d9b67931545e1059b2e27d532ac81ec5f33133 /system/libraries/Unit_test.php
parent3639d4798cd1ac26b715d8d74ff7855474fb01d7 (diff)
[ci skip] style and phpdoc-related changes (rel #1295)
Diffstat (limited to 'system/libraries/Unit_test.php')
-rw-r--r--system/libraries/Unit_test.php34
1 files changed, 25 insertions, 9 deletions
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index c2c01758e..7b99dee0d 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -38,13 +38,18 @@
*/
class CI_Unit_test {
- public $active = TRUE;
- public $results = array();
- public $strict = FALSE;
- protected $_template = NULL;
- protected $_template_rows = NULL;
+ public $active = TRUE;
+ public $results = array();
+ public $strict = FALSE;
+ protected $_template = NULL;
+ protected $_template_rows = NULL;
protected $_test_items_visible = array();
+ /**
+ * Constructor
+ *
+ * @return void
+ */
public function __construct()
{
// These are the default items visible when a test is run.
@@ -86,9 +91,10 @@ class CI_Unit_test {
*
* Runs the supplied tests
*
- * @param mixed
- * @param mixed
- * @param string
+ * @param mixed $test
+ * @param mixed $expected = TRUE
+ * @param string $test_name = 'undefined'
+ * @param string $notes = ''
* @return string
*/
public function run($test, $expected = TRUE, $test_name = 'undefined', $notes = '')
@@ -134,6 +140,7 @@ class CI_Unit_test {
*
* Displays a table with the test data
*
+ * @param array $result = array()
* @return string
*/
public function report($result = array())
@@ -213,6 +220,7 @@ class CI_Unit_test {
*
* Returns the raw result data
*
+ * @param array $results = array()
* @return array
*/
public function result($results = array())
@@ -345,14 +353,22 @@ class CI_Unit_test {
}
/**
- * Helper functions to test boolean true/false
+ * Helper function to test boolean TRUE
*
+ * @param mixed $test
* @return bool
*/
function is_true($test)
{
return ($test === TRUE);
}
+
+/**
+ * Helper function to test boolean FALSE
+ *
+ * @param mixed $test
+ * @return bool
+ */
function is_false($test)
{
return ($test === FALSE);