summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-11-12 16:04:55 +0100
committerAndrey Andreev <narf@devilix.net>2013-11-12 16:04:55 +0100
commitf964b16f3db95d655420dfae2012ee9fbb98a1a8 (patch)
treea3a2acf87bf15604da653c67e1a348097225f817 /tests
parent35e3b0bc4f723b938160da87aeb5ad9e054507c4 (diff)
Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it
Calls to this function are often needed before the Input library is available
Diffstat (limited to 'tests')
-rw-r--r--tests/mocks/core/common.php9
-rw-r--r--tests/mocks/core/uri.php5
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index e5dc29c86..b073f230d 100644
--- a/tests/mocks/core/common.php
+++ b/tests/mocks/core/common.php
@@ -190,4 +190,13 @@ if ( ! function_exists('set_status_header'))
{
return TRUE;
}
+}
+
+if ( ! function_exists('is_cli'))
+{
+ // In order to test HTTP functionality, we need to lie about this
+ function is_cli()
+ {
+ return FALSE;
+ }
} \ No newline at end of file
diff --git a/tests/mocks/core/uri.php b/tests/mocks/core/uri.php
index 94f75df64..11078587b 100644
--- a/tests/mocks/core/uri.php
+++ b/tests/mocks/core/uri.php
@@ -18,9 +18,4 @@ class Mock_Core_URI extends CI_URI {
}
- protected function _is_cli_request()
- {
- return FALSE;
- }
-
} \ No newline at end of file