コード例 #1
0
ファイル: HttpClientTest.php プロジェクト: alnutile/drunatra
 /**
  * @test
  */
 public function shouldDoPOSTRequestWithoutContent()
 {
     $path = '/some/path';
     $client = $this->getBrowserMock();
     $client->expects($this->once())->method('createRequest')->with('POST', $path, $this->isType('array'));
     $httpClient = new HttpClient(array(), $client);
     $httpClient->post($path);
 }
コード例 #2
0
 /**
  * @test
  */
 public function shouldDoPOSTRequestWithoutContent()
 {
     $path = '/some/path';
     $client = $this->getBrowserMock();
     $httpClient = new HttpClient(array(), $client);
     $httpClient->post($path);
     $this->assertEmpty($httpClient->getLastRequest()->getContent());
 }
コード例 #3
0
 /**
  * @test
  */
 public function shouldDoPOSTRequest()
 {
     $path = '/some/path';
     $parameters = array('a' => 'b');
     $headers = array('c' => 'd');
     $client = $this->getBrowserMock();
     $httpClient = new HttpClient(array(), $client);
     $httpClient->post($path, $parameters, $headers);
 }