diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2015-04-06 18:59:53 +0200 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2015-04-06 18:59:53 +0200 |
commit | 5e50c42ef27261bc7fcb279499ce76cfc2519aa6 (patch) | |
tree | d74d660534b72ddc0b6cda9147cecfb64a225346 /tests/mocks | |
parent | ed520408514fff6486788e1543589418d24d885e (diff) | |
parent | 7726b75552f765af94038e47a4a4272ac08c646e (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'tests/mocks')
-rw-r--r-- | tests/mocks/core/input.php | 8 | ||||
-rw-r--r-- | tests/mocks/core/security.php | 5 | ||||
-rw-r--r-- | tests/mocks/database/db.php | 5 |
3 files changed, 15 insertions, 3 deletions
diff --git a/tests/mocks/core/input.php b/tests/mocks/core/input.php index 0d1873849..40e27441f 100644 --- a/tests/mocks/core/input.php +++ b/tests/mocks/core/input.php @@ -38,4 +38,12 @@ class Mock_Core_Input extends CI_Input { 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/security.php b/tests/mocks/core/security.php index a21fc5cb3..6cff85860 100644 --- a/tests/mocks/core/security.php +++ b/tests/mocks/core/security.php @@ -16,6 +16,11 @@ class Mock_Core_Security extends CI_Security { return isset($this->{'_'.$property}) ? $this->{'_'.$property} : NULL; } + public function remove_evil_attributes($str, $is_image) + { + return $this->_remove_evil_attributes($str, $is_image); + } + // Override inaccessible protected method public function __call($method, $params) { diff --git a/tests/mocks/database/db.php b/tests/mocks/database/db.php index 968476dea..00dd884b0 100644 --- a/tests/mocks/database/db.php +++ b/tests/mocks/database/db.php @@ -56,8 +56,7 @@ class Mock_Database_DB { 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', - 'autoinit' => TRUE, - 'stricton' => FALSE, + 'stricton' => FALSE ); $config = array_merge($this->config[$group], $params); @@ -134,7 +133,7 @@ class Mock_Database_DB { } catch (Exception $e) { - throw new InvalidArgumentException($e->getMessage()); + throw new RuntimeException($e->getMessage()); } return $db; |