Skip to content

Commit

Permalink
test: update parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Feb 15, 2023
1 parent 94cbd67 commit ba1a5ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions tests/system/Session/Handlers/Database/MySQLiHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace CodeIgniter\Session\Handlers\Database;

use CodeIgniter\Config\Factories;
use Config\App as AppConfig;
use Config\Database as DatabaseConfig;
use Config\Session as SessionConfig;

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

return new MySQLiHandler(new AppConfig(), $this->userIpAddress);
return new MySQLiHandler($sessionConfig, $this->userIpAddress);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace CodeIgniter\Session\Handlers\Database;

use CodeIgniter\Config\Factories;
use Config\App as AppConfig;
use Config\Database as DatabaseConfig;
use Config\Session as SessionConfig;

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

return new PostgreHandler(new AppConfig(), $this->userIpAddress);
return new PostgreHandler($sessionConfig, $this->userIpAddress);
}
}
5 changes: 1 addition & 4 deletions tests/system/Session/Handlers/Database/RedisHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

namespace CodeIgniter\Session\Handlers\Database;

use CodeIgniter\Config\Factories;
use CodeIgniter\Session\Handlers\RedisHandler;
use CodeIgniter\Test\CIUnitTestCase;
use Config\App as AppConfig;
use Config\Session as SessionConfig;
use Redis;

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

return new RedisHandler(new AppConfig(), $this->userIpAddress);
return new RedisHandler($sessionConfig, $this->userIpAddress);
}

public function testSavePathWithoutProtocol()
Expand Down

0 comments on commit ba1a5ce

Please sign in to comment.