Skip to content

Commit cf53f0f

Browse files
authored
Merge pull request #7004 from kenjis/fix-db-session-tests
test: update failed DB session tests
2 parents 934885f + 0de725e commit cf53f0f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/_support/Database/Seeds/CITestSeeder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function run()
150150

151151
if ($this->db->DBDriver === 'MySQLi') {
152152
$data['ci_sessions'][] = [
153-
'id' => '1f5o06b43phsnnf8if6bo33b635e4p2o',
153+
'id' => 'ci_session:1f5o06b43phsnnf8if6bo33b635e4p2o',
154154
'ip_address' => '127.0.0.1',
155155
'timestamp' => '2021-06-25 21:54:14',
156156
'data' => '__ci_last_regenerate|i:1624650854;_ci_previous_url|s:40:\"http://localhost/index.php/home/index\";',
@@ -159,7 +159,7 @@ public function run()
159159

160160
if ($this->db->DBDriver === 'Postgre') {
161161
$data['ci_sessions'][] = [
162-
'id' => '1f5o06b43phsnnf8if6bo33b635e4p2o',
162+
'id' => 'ci_session:1f5o06b43phsnnf8if6bo33b635e4p2o',
163163
'ip_address' => '127.0.0.1',
164164
'timestamp' => '2021-06-25 21:54:14.991403+02',
165165
'data' => '\x' . bin2hex('__ci_last_regenerate|i:1624650854;_ci_previous_url|s:40:\"http://localhost/index.php/home/index\";'),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function testWriteInsert()
7676
$this->setPrivateProperty($handler, 'lock', false);
7777

7878
$row = $this->db->table('ci_sessions')
79-
->getWhere(['id' => '555556b43phsnnf8if6bo33b635e4444'])
79+
->getWhere(['id' => 'ci_session:555556b43phsnnf8if6bo33b635e4444'])
8080
->getRow();
8181

8282
$this->assertGreaterThan(time() - 100, strtotime($row->timestamp));
@@ -100,7 +100,7 @@ public function testWriteUpdate()
100100
$releaseLock();
101101

102102
$row = $this->db->table('ci_sessions')
103-
->getWhere(['id' => '1f5o06b43phsnnf8if6bo33b635e4p2o'])
103+
->getWhere(['id' => 'ci_session:1f5o06b43phsnnf8if6bo33b635e4p2o'])
104104
->getRow();
105105

106106
$this->assertGreaterThan(time() - 100, strtotime($row->timestamp));

0 commit comments

Comments
 (0)