delete() public method

Used by model to DELETE.
public delete ( object $query, array $options = [] ) : string
$query object
$options array
return string
コード例 #1
0
ファイル: HttpTest.php プロジェクト: fedeisas/lithium
 public function testDeleteWithModel()
 {
     $http = new Http($this->_testConfig);
     $query = new Query(array('model' => $this->_model, 'data' => array('id' => '1')));
     $result = $http->delete($query);
     $expected = join("\r\n", array('DELETE /posts/1 HTTP/1.1', 'Host: localhost:80', 'Connection: Close', 'User-Agent: Mozilla/5.0', '', ''));
     $result = (string) $http->last->request;
     $this->assertEqual($expected, $result);
 }