/** * @dataProvider driverSet */ public function testStorage(Storage $storage) { $storage->setContents($this->key, 'Test contents'); $this->assertTrue($storage->keyExists($this->key)); $this->assertSame('Test contents', $storage->getContents($this->key)); $storage->deleteKey($this->key); $this->assertFalse($storage->keyExists($this->key)); }
/** * @dataProvider driverSet */ public function testDelete(Storage $storage) { $storage->deleteKey($this->newKey); $this->assertFalse($storage->keyExists($this->newKey)); }
/** * Check if file exists * @return bool */ public function exists() { return $this->storage->keyExists($this->getKey()); }