mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #354 from shama/patch-databasesession-test-fix
Fix DatabaseSessionTest garbage collection test case
This commit is contained in:
commit
a062135d87
1 changed files with 6 additions and 3 deletions
|
@ -169,11 +169,14 @@ class DatabaseSessionTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testGc() {
|
||||
ClassRegistry::flush();
|
||||
Configure::write('Session.timeout', 0);
|
||||
$this->storage->write('foo', 'Some value');
|
||||
|
||||
$storage = new DatabaseSession();
|
||||
$storage->write('foo', 'Some value');
|
||||
|
||||
sleep(1);
|
||||
$this->storage->gc();
|
||||
$this->assertFalse($this->storage->read('foo'));
|
||||
$storage->gc();
|
||||
$this->assertFalse($storage->read('foo'));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue