Merge pull request #354 from shama/patch-databasesession-test-fix

Fix DatabaseSessionTest garbage collection test case
This commit is contained in:
ADmad 2011-12-05 06:00:59 -08:00
commit a062135d87

View file

@ -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'));
}
}