/** * Delete a comment identified by its id. * * More info: https://api.stackexchange.com/docs/delete-comment * * @param string $id The id of comment * @param string[] $request The array which contains the required parameters as 'site' * * @return \BenatEspina\StackExchangeApiClient\Model\Interfaces\CommentInterface */ public function remove($id, $request = []) { return $this->responseToComment($this->client->delete($this->prefix . '/' . $id . '/delete', [], $request)); }
function it_removes_a_comment(Client $client) { $client->delete('/comments/comment-id/delete', [], ['site' => 'StackApps'])->shouldBeCalled()->willReturn($this->response); $this->remove('comment-id', ['site' => 'StackApps'])->shouldReturnAnInstanceOf('BenatEspina\\StackExchangeApiClient\\Model\\Interfaces\\CommentInterface'); }