Property | Type | Description | |
---|---|---|---|
$_responses | array | Mock responses to return. |
Method | Description | |
---|---|---|
addResponse ( string | resourse $body, string $code = 200, string $uri = '', array $headers = [] ) : Horde_Http_Response_Mock | Adds a response to the stack of responses. | |
addResponses ( array $responses ) : null | Set the HTTP response(s) to be returned by this adapter as an array of strings. | |
send ( ) : Horde_Http_Response_Mock | null | Send this HTTP request | |
setResponse ( Horde_Http_Response_Base $response ) | Set the HTTP response(s) to be returned by this adapter. This overwrites any responses set before. |
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. |
public addResponses ( array $responses ) : null | ||
$responses | array | The responses to be added to the stack. |
return | null |
public setResponse ( Horde_Http_Response_Base $response ) | ||
$response | Horde_Http_Response_Base |
protected array $_responses | ||
return | array |