public function clear() : self
{
$this->storage = [];
return $this;
}
/** * Tests unset(). */ public function testUnset() { // Nothing is saved $this->assertFalse(isset($this->cache->{self::CACHE_KEY})); // Save and check $this->saveObject(); $this->assertTrue(isset($this->cache->{self::CACHE_KEY})); // Unset the object and check unset($this->cache->{self::CACHE_KEY}); $this->assertFalse(isset($this->cache->{self::CACHE_KEY})); // Save and check again $this->saveObject(); $this->assertTrue(isset($this->cache->{self::CACHE_KEY})); $this->cache->clear(); }