public function store(Item $item) { $this->delete($item->getKey()); return file_put_contents($this->generateNewFilename($item), serialize($item)) !== false; }
public function testGetKey() { $item = new Item('key'); $this->assertEquals('key', $item->getKey()); }
public function store(Item $item) { $this->data[$item->getKey()] = $item; return true; }