From 5fd3ae8d33a4f5d3159b86683b9a670e973a63f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 24 Oct 2012 14:55:35 +0300 Subject: [ci skip] style and phpdoc-related changes (rel #1295) --- system/libraries/Unit_test.php | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'system/libraries/Unit_test.php') 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); -- cgit v1.2.3-24-g4f1b