From 597ea27a0660bdf72f84d74566cc842e4da37efd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 22:56:26 +0200 Subject: [ci skip] DocBlocks for Email, Ftp, Unit_test and Javascript libraries Partially fixes issue #1295 --- system/libraries/Unit_test.php | 51 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) (limited to 'system/libraries/Unit_test.php') diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 5c0018d35..2710b5513 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -39,13 +39,52 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_Unit_test { + /** + * Active flag + * + * @var bool + */ public $active = TRUE; + + /** + * Test results + * + * @var array + */ public $results = array(); + + /** + * Strict comparison flag + * + * Whether to use === or == when comparing + * + * @var bool + */ public $strict = FALSE; + + /** + * Template + * + * @var string + */ protected $_template = NULL; + + /** + * Template rows + * + * @var string + */ protected $_template_rows = NULL; + + /** + * List of visible test items + * + * @var array + */ protected $_test_items_visible = array(); + // -------------------------------------------------------------------- + /** * Constructor * @@ -93,9 +132,9 @@ class CI_Unit_test { * Runs the supplied tests * * @param mixed $test - * @param mixed $expected = TRUE - * @param string $test_name = 'undefined' - * @param string $notes = '' + * @param mixed $expected + * @param string $test_name + * @param string $notes * @return string */ public function run($test, $expected = TRUE, $test_name = 'undefined', $notes = '') @@ -113,7 +152,7 @@ class CI_Unit_test { } else { - $result = ($this->strict === TRUE) ? ($test === $expected) : ($test === $expected); + $result = ($this->strict === TRUE) ? ($test === $expected) : ($test == $expected); $extype = gettype($expected); } @@ -141,7 +180,7 @@ class CI_Unit_test { * * Displays a table with the test data * - * @param array $result = array() + * @param array $result * @return string */ public function report($result = array()) @@ -221,7 +260,7 @@ class CI_Unit_test { * * Returns the raw result data * - * @param array $results = array() + * @param array $results * @return array */ public function result($results = array()) -- cgit v1.2.3-24-g4f1b