コード例 #1
0
ファイル: ClientSpec.php プロジェクト: gianarb/gstatus
 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");
 }
コード例 #2
0
ファイル: Client.php プロジェクト: gianarb/gstatus
 public function send(Status $request)
 {
     $request->prepareRequest($this->token);
     return $this->getHttpClient()->send($request);
 }