summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorftwbzhao <b.zhao1@gmail.com>2015-07-06 07:18:11 +0200
committerftwbzhao <b.zhao1@gmail.com>2015-07-06 07:18:11 +0200
commita5ea5066e4463a3857d6add2c5e2bc6833d1cbc0 (patch)
tree180100850a263e06528d40fac24ceb6a5d8843b1
parenta1170aff602317d9b6f2d5c1d5cc60d3dc82ee58 (diff)
Added "is_resource" into the list of unit tests capable of being run.
-rw-r--r--system/libraries/Unit_test.php2
-rw-r--r--user_guide_src/source/libraries/unit_testing.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index 7b744adc6..60b046ba0 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -152,7 +152,7 @@ class CI_Unit_test {
return FALSE;
}
- if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null'), TRUE))
+ if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null', 'is_resource'), TRUE))
{
$expected = str_replace('is_double', 'is_float', $expected);
$result = $expected($test);
diff --git a/user_guide_src/source/libraries/unit_testing.rst b/user_guide_src/source/libraries/unit_testing.rst
index 026781cb7..57934cba3 100644
--- a/user_guide_src/source/libraries/unit_testing.rst
+++ b/user_guide_src/source/libraries/unit_testing.rst
@@ -76,6 +76,7 @@ result. Here is a list of allowed comparison types:
- is_double
- is_array
- is_null
+- is_resource
Generating Reports
==================