diff options
author | Andrey Andreev <narf@devilix.net> | 2015-07-06 10:11:35 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-07-06 10:11:35 +0200 |
commit | 358de8cda7ad24a0dc00ccb346bf620fff3d2479 (patch) | |
tree | 3d4266c4ae805aa07125423f11986017461c5769 | |
parent | b28ae67ae212d52ac1a3970fbf42ef99ce09450a (diff) | |
parent | a5ea5066e4463a3857d6add2c5e2bc6833d1cbc0 (diff) |
Merge pull request #3957 from ftwbzhao/feature/unittest
Added "is_resource" into the list of unit tests capable of being run.
-rw-r--r-- | system/libraries/Unit_test.php | 2 | ||||
-rw-r--r-- | user_guide_src/source/libraries/unit_testing.rst | 1 |
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 ================== |