public function testReplaceItemReturnsFalseIfNonWritable() { $this->_storage->setItem('key', 'value'); $this->_options->setWritable(false); $this->assertFalse($this->_storage->replaceItem('key', 'newvalue')); $this->assertEquals('value', $this->_storage->getItem('key')); }
/** * @test */ public function delegatesReplaceItem() { $this->storage->replaceItem('cacheKey', 'value')->willReturn(true); $return = $this->cache->replaceItem('cacheKey', 'value'); $this->assertTrue($return); }
public function replaceItem($key, $value) { return $this->storage->replaceItem($key, $value); }