Skip to content

Commit

Permalink
Fix DatabaseSessionTest garbage collection test case
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Dec 4, 2011
1 parent 1bc3583 commit 66b3e9a
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -169,11 +169,14 @@ public function testDestroy() {
* @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'));
}
}

0 comments on commit 66b3e9a

Please sign in to comment.