diff options
Diffstat (limited to 'tests/mocks')
-rw-r--r-- | tests/mocks/autoloader.php | 1 | ||||
-rw-r--r-- | tests/mocks/core/input.php | 49 | ||||
-rw-r--r-- | tests/mocks/core/utf8.php | 19 |
3 files changed, 0 insertions, 69 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 11825de2c..a912327ca 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -33,7 +33,6 @@ function autoload($class) $ci_libraries = array( 'Calendar', - 'Cart', 'Driver_Library', 'Email', 'Encrypt', diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php deleted file mode 100644 index 40e27441f..000000000 --- a/tests/mocks/core/input.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -class Mock_Core_Input extends CI_Input { - - /** - * Since we use GLOBAL to fetch Security and Utf8 classes, - * we need to use inversion of control to mock up - * the same process within CI_Input class constructor. - * - * @covers CI_Input::__construct() - */ - public function __construct($security, $utf8) - { - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); - $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - // Assign Security and Utf8 classes - $this->security = $security; - $this->uni = $utf8; - - // Sanitize global arrays - $this->_sanitize_globals(); - } - - public function fetch_from_array($array, $index = '', $xss_clean = FALSE) - { - return parent::_fetch_from_array($array, $index, $xss_clean); - } - - /** - * Lie about being a CLI request - * - * We take advantage of this in libraries/Session_test - */ - public function is_cli_request() - { - return FALSE; - } - - public function __set($name, $value) - { - if ($name === 'ip_address') - { - $this->ip_address = $value; - } - } - -}
\ No newline at end of file diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php deleted file mode 100644 index 3a6282e1d..000000000 --- a/tests/mocks/core/utf8.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -class Mock_Core_Utf8 extends CI_Utf8 { - - /** - * We need to define UTF8_ENABLED the same way that - * CI_Utf8 constructor does. - */ - public function __construct() - { - if (defined('UTF8_ENABLED')) - { - return; - } - - parent::__construct(); - } - -}
\ No newline at end of file |