Adds a response to the stack of responses.
public addResponse ( string | resourse $body, string $code = 200, string $uri = '', array $headers = [] ) : Horde_Http_Response_Mock | ||
$body | string | resourse | The response body content. |
$code | string | The response code. |
$uri | string | The request uri. |
$headers | array | Response headers. This can be one string representing the whole header or an array of strings with one string per header line. |
return | Horde_Http_Response_Mock | The response. |