public function testRemoveItemsFail() { $options = array('ttl' => 123); $items = array('key1', 'key2', 'key3'); $this->_storage->expects($this->at(0))->method('removeItem')->with($this->equalTo('key1'), $this->equalTo($options))->will($this->returnValue(true)); $this->_storage->expects($this->at(1))->method('removeItem')->with($this->equalTo('key2'), $this->equalTo($options))->will($this->returnValue(false)); // -> fail $this->_storage->expects($this->at(2))->method('removeItem')->with($this->equalTo('key3'), $this->equalTo($options))->will($this->returnValue(true)); $this->assertFalse($this->_storage->removeItems($items, $options)); }