Fix DatabaseSessionTest garbage collection test case #354

Merged
merged 1 commit into from Dec 5, 2011
Jump to file or symbol
Failed to load files and symbols.
+6 −3
Split
@@ -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'));
}
}