Exemplo n.º 1
0
 /**
  * @test
  * @group  small
  * @uses   Ci\RestClientBundle\Services\RestClient::post
  * @covers ::setContentType
  * @covers ::<private>
  */
 public function setContentType()
 {
     $this->restClient->setContentType('application/json');
     $response = $this->restClient->post($this->getHTTP200Route(), 'payload');
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
     $this->assertSame('application/json', $response->headers->get('Content-Type'));
 }
Exemplo n.º 2
0
 /**
  * @test
  * @group  small
  * @covers ::setContentType
  * @covers ::<private>
  */
 public function setContentType()
 {
     $contentType = 'application/json';
     $this->curl->expects($this->once())->method('setContentType')->with($this->equalTo($contentType));
     $this->assertInstanceOf(get_class($this->restClient), $this->restClient->setContentType($contentType));
 }