Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

Fix DatabaseSessionTest garbage collection test case
  • Loading branch information...
commit 59614b763c9217a1344f6d78c3877c374efc16a8 2 parents 69c2750 + 5ee7729
ADmad ADmad authored
9 Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php
@@ -169,11 +169,14 @@ public function testDestroy() {
169 169 * @return void
170 170 */
171 171 public function testGc() {
  172 + ClassRegistry::flush();
172 173 Configure::write('Session.timeout', 0);
173   - $this->storage->write('foo', 'Some value');
  174 +
  175 + $storage = new DatabaseSession();
  176 + $storage->write('foo', 'Some value');
174 177
175 178 sleep(1);
176   - $this->storage->gc();
177   - $this->assertFalse($this->storage->read('foo'));
  179 + $storage->gc();
  180 + $this->assertFalse($storage->read('foo'));
178 181 }
179 182 }

0 comments on commit 59614b7

Please sign in to comment.
Something went wrong with that request. Please try again.