/** * @test */ public function delegatesAddItems() { $keyValuePairs = []; $this->storage->addItems($keyValuePairs)->willReturn(true); $return = $this->cache->addItems($keyValuePairs); $this->assertTrue($return); }
public function testAddItemsReturnsFailedKeys() { $this->assertTrue($this->_storage->setItem('key1', 'value1')); $failedKeys = $this->_storage->addItems(array('key1' => 'XYZ', 'key2' => 'value2')); $this->assertSame(array('key1'), $failedKeys); $this->assertSame('value1', $this->_storage->getItem('key1')); $this->assertTrue($this->_storage->hasItem('key2')); }
public function addItems(array $keyValuePairs) { return $this->storage->addItems($keyValuePairs); }