function it_should_reply_with_the_body(ZFClient $client, Status $status) { $status->prepareRequest("my token")->shouldBeCalledTimes(1); $client->send($status)->shouldBeCalledTimes(1); $this->setHttpClient($client); $client->send($status)->willReturn("the body"); $this->send($status)->shouldBe("the body"); }
public function send(Status $request) { $request->prepareRequest($this->token); return $this->getHttpClient()->send($request); }