summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-09 20:52:25 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-09 20:52:25 +0200
commitcf512a63b5de57763e03dc3309205843e4d62511 (patch)
treed67342947f063028dff2031f2061efa11d1dd08b /tests/codeigniter
parent2e3e23053d9748c68fa2c0e11f43af67da8743e8 (diff)
parent82003dac7e1da25ffb0d925ba197121b5b7b27f5 (diff)
Merge pull request #1868 from dchill42/session_unit
Overloaded is_cli_request in Input mock for Session test
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/libraries/Session_test.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/codeigniter/libraries/Session_test.php b/tests/codeigniter/libraries/Session_test.php
index 135f71806..60d3a5b30 100644
--- a/tests/codeigniter/libraries/Session_test.php
+++ b/tests/codeigniter/libraries/Session_test.php
@@ -30,15 +30,11 @@ class Session_test extends CI_TestCase {
// Establish necessary support classes
$obj = new stdClass;
- $classes = array(
- 'config' => 'cfg',
- 'load' => 'load',
- 'input' => 'in'
- );
- foreach ($classes as $name => $abbr) {
- $class = $this->ci_core_class($abbr);
- $obj->$name = new $class;
- }
+ $cfg = $this->ci_core_class('cfg');
+ $obj->config = new $cfg();
+ $ldr = $this->ci_core_class('load');
+ $obj->load = new $ldr();
+ $obj->input = new Mock_Core_Input(NULL, NULL);
$this->ci_instance($obj);
// Attach session instance locally
@@ -401,5 +397,4 @@ class Session_test extends CI_TestCase {
$this->session->native->sess_destroy();
$this->assertNull($this->session->native->userdata($key));
}
-}
-
+} \ No newline at end of file