/** * Verifies that an item with an expiration time in the past won't be retrieved. * * @param mixed $value * A value to try and cache. * * @dataProvider providerPrimitiveValues */ public function testExpiresAt($value) { $pool = new MemoryPool(); $item = $pool->getItem('foo'); $item->set($value)->expiresAt(new \DateTime('-1 minute')); $pool->save($item); $item = $pool->getItem('foo'); $this->assertNull($item->get()); $this->assertFalse($item->isHit()); }