예제 #1
0
 /**
  * @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);
 }
 /**
  * @test
  */
 public function shouldDoPOSTRequestWithoutContent()
 {
     $path = '/some/path';
     $client = $this->getBrowserMock();
     $httpClient = new HttpClient(array(), $client);
     $httpClient->post($path);
     $this->assertEmpty($httpClient->getLastRequest()->getContent());
 }
 /**
  * @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);
 }