/** * @test */ public function hasItemReturnsTrueWhenItemIsUnderConstruction() { $this->storage->hasItem('foo')->willReturn(false); $this->storage->hasItem($this->delayedKey)->willReturn(true); $return = $this->cache->hasItem('foo'); $this->assertTrue($return); }