Commit 48f38844 by Carsten Brandt
parent e2513de6
......@@ -77,10 +77,11 @@ class DbCacheTest extends CacheTest
{
$cache = $this->getCacheInstance();
static::$time = \time();
$this->assertTrue($cache->set('expire_test', 'expire_test', 2));
static::$time = time() + 1;
static::$time++;
$this->assertEquals('expire_test', $cache->get('expire_test'));
static::$time = time() + 2;
static::$time++;
$this->assertFalse($cache->get('expire_test'));
}
}
......@@ -27,10 +27,11 @@ class FileCacheTest extends CacheTest
{
$cache = $this->getCacheInstance();
static::$time = \time();
$this->assertTrue($cache->set('expire_test', 'expire_test', 2));
static::$time = time() + 1;
static::$time++;
$this->assertEquals('expire_test', $cache->get('expire_test'));
static::$time = time() + 2;
static::$time++;
$this->assertFalse($cache->get('expire_test'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment