summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/core/input.php8
-rw-r--r--tests/mocks/core/security.php5
-rw-r--r--tests/mocks/database/db.php5
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;