/** * @test */ public function prepareRequests() { $datas = new Datas(array(new Data("foo1", new SomeClass("bar1"), new HeaderBag(array("Content-Type" => "application/json", "X-Riak-ClientId" => "test")), '{"id":"bar1"}'), new Data("foo2", new SomeClass("bar2"), new HeaderBag(array("Content-Type" => "application/json", "X-Riak-ClientId" => "test")), '{"id":"bar2"}'))); $request = $this->getMock("Guzzle\\Http\\Message\\RequestInterface"); $client = $this->getMock("Guzzle\\Service\\ClientInterface"); $client->expects($this->exactly(2))->method("createRequest")->will($this->returnValue($request)); $curlMulti = $this->getMock("Guzzle\\Http\\Curl\\CurlMultiInterface"); $curlMulti->expects($this->exactly(2))->method("add")->with($this->equalTo($request)); $this->riakKVServiceClient->prepareRequests("PUT", $datas, $curlMulti, $client); }
/** * @param array<string> $keys * @return boolean */ public function delete($keys) { return $this->riakKVServiceClient->delete($this->cluster, $this, $keys); }