public function testSetAll() { $this->assertNull($this->cache->getAll()); $data = ['foo', 'bar', 'baz']; $this->cache->setAll($data); $this->assertEquals($data, $this->cache->getAll()); }
public function getAll() { if ($data = $this->cache->getAll()) { return $data; } $data = $this->storage->getAll(); $this->cache->setAll($data); return $data; }