Пример #1
0
 /**
  * @test
  * @group  small
  * @covers ::delete
  * @covers ::<private>
  */
 public function deleteOnError()
 {
     $response = $this->restClient->delete($this->getHTTP404Route());
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
     $this->assertEquals(404, $response->getStatusCode());
 }
Пример #2
0
 /**
  * @test
  * @group  small
  * @covers ::delete
  * @covers ::<private>
  */
 public function delete()
 {
     $response = new Response('content');
     $this->curl->expects($this->once())->method('sendRequest')->with($this->equalTo($this->mockControllerUrl), $this->equalTo('DELETE'), $this->equalTo(array()))->will($this->returnValue($response));
     $this->assertSame($response, $this->restClient->delete($this->mockControllerUrl));
 }