summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-12 17:07:34 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-12 17:07:34 +0100
commit1480d8c1b58babf23f701796c8130f11d12c42c5 (patch)
treed87f9e5e4d7c0fe1ff03f3c4b27b944ace9d9491 /tests/mocks
parentbe1496d1a8618ef186047468009c7e3e0640183b (diff)
Remove pointless mocks for remove_invisible_characters(), is_php(), is_really_writable()
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/core/common.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index b073f230d..9eb6b0954 100644
--- a/tests/mocks/core/common.php
+++ b/tests/mocks/core/common.php
@@ -87,40 +87,6 @@ if ( ! function_exists('load_class'))
}
}
-// This is sort of meh. Should probably be mocked up with
-// controllable output, so that we can test some of our
-// security code. The function itself will be tested in the
-// bootstrap testsuite.
-// --------------------------------------------------------------------
-
-if ( ! function_exists('remove_invisible_characters'))
-{
- function remove_invisible_characters($str, $url_encoded = TRUE)
- {
- $non_displayables = array();
-
- // every control character except newline (dec 10)
- // carriage return (dec 13), and horizontal tab (dec 09)
-
- if ($url_encoded)
- {
- $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
- $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
- }
-
- $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
-
- do
- {
- $str = preg_replace($non_displayables, '', $str, -1, $count);
- }
- while ($count);
-
- return $str;
- }
-}
-
-
// Clean up error messages
// --------------------------------------------------------------------
@@ -150,23 +116,6 @@ if ( ! function_exists('_exception_handler'))
// We assume a few things about our environment ...
// --------------------------------------------------------------------
-
-if ( ! function_exists('is_php'))
-{
- function is_php($version = '5.0.0')
- {
- return ! (version_compare(PHP_VERSION, $version) < 0);
- }
-}
-
-if ( ! function_exists('is_really_writable'))
-{
- function is_really_writable($file)
- {
- return is_writable($file);
- }
-}
-
if ( ! function_exists('is_loaded'))
{
function &is_loaded()