public function testSetDueDate_ExistedKey() { $this->cache->setDueDate('php', 'Old Value', time() + 100); $this->assertEquals('Old Value', $this->cache->get('php')); $this->cache->setDueDate('php', 'PHP: Hypertext Processor', time() + 1); $this->assertEquals('PHP: Hypertext Processor', $this->cache->get('php')); usleep(2000000); $this->assertEmpty($this->cache->get('php')); }