diff options
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 | ||||
-rw-r--r-- | tests/mocks/database/schema/skeleton.php | 2 |
4 files changed, 16 insertions, 4 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; diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php index 5fe5b0f30..888236ff3 100644 --- a/tests/mocks/database/schema/skeleton.php +++ b/tests/mocks/database/schema/skeleton.php @@ -131,7 +131,7 @@ class Mock_Database_Schema_Skeleton { 'job' => array( array('id' => 1, 'name' => 'Developer', 'description' => 'Awesome job, but sometimes makes you bored'), array('id' => 2, 'name' => 'Politician', 'description' => 'This is not really a job'), - array('id' => 3, 'name' => 'Accountant', 'description' => 'Boring job, but you will get free snack at lunch'), + array('id' => 3, 'name' => 'Accountant', 'description' => 'Boring job, but you will get free snack at lunch'), array('id' => 4, 'name' => 'Musician', 'description' => 'Only Coldplay can actually called Musician') ), 'misc' => array( |