Skip to content

Commit ba1a5ce

Browse files
committed
test: update parameter
1 parent 94cbd67 commit ba1a5ce

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

tests/system/Session/Handlers/Database/MySQLiHandlerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace CodeIgniter\Session\Handlers\Database;
1313

14-
use CodeIgniter\Config\Factories;
15-
use Config\App as AppConfig;
1614
use Config\Database as DatabaseConfig;
1715
use Config\Session as SessionConfig;
1816

@@ -49,8 +47,7 @@ protected function getInstance($options = [])
4947
foreach ($config as $key => $value) {
5048
$sessionConfig->{$key} = $value;
5149
}
52-
Factories::injectMock('config', 'Session', $sessionConfig);
5350

54-
return new MySQLiHandler(new AppConfig(), $this->userIpAddress);
51+
return new MySQLiHandler($sessionConfig, $this->userIpAddress);
5552
}
5653
}

tests/system/Session/Handlers/Database/PostgreHandlerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace CodeIgniter\Session\Handlers\Database;
1313

14-
use CodeIgniter\Config\Factories;
15-
use Config\App as AppConfig;
1614
use Config\Database as DatabaseConfig;
1715
use Config\Session as SessionConfig;
1816

@@ -49,8 +47,7 @@ protected function getInstance($options = [])
4947
foreach ($config as $key => $value) {
5048
$sessionConfig->{$key} = $value;
5149
}
52-
Factories::injectMock('config', 'Session', $sessionConfig);
5350

54-
return new PostgreHandler(new AppConfig(), $this->userIpAddress);
51+
return new PostgreHandler($sessionConfig, $this->userIpAddress);
5552
}
5653
}

tests/system/Session/Handlers/Database/RedisHandlerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111

1212
namespace CodeIgniter\Session\Handlers\Database;
1313

14-
use CodeIgniter\Config\Factories;
1514
use CodeIgniter\Session\Handlers\RedisHandler;
1615
use CodeIgniter\Test\CIUnitTestCase;
17-
use Config\App as AppConfig;
1816
use Config\Session as SessionConfig;
1917
use Redis;
2018

@@ -49,9 +47,8 @@ protected function getInstance($options = [])
4947
foreach ($config as $key => $value) {
5048
$sessionConfig->{$key} = $value;
5149
}
52-
Factories::injectMock('config', 'Session', $sessionConfig);
5350

54-
return new RedisHandler(new AppConfig(), $this->userIpAddress);
51+
return new RedisHandler($sessionConfig, $this->userIpAddress);
5552
}
5653

5754
public function testSavePathWithoutProtocol()

0 commit comments

Comments
 (0)