A testing-purposes adapter.
Should be used to test all components that rely on Zend_Http_Client, without actually performing an HTTP request. You should instantiate this object manually, and then set it as the client’s adapter. Then, you can set the expected response using the setResponse() method.
Adapter constructor, currently empty. Config is set using setOptions()
Set the nextRequestWillFail flag
Parameters: | bool – |
---|---|
Return type: | ZendHttpClientAdapterTest |
Set the configuration array for the adapter
Parameters: | array|Traversable – |
---|---|
Throws ExceptionInvalidArgumentException: | |
Connect to the remote server
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
Send request to the remote server
Parameters: |
|
---|---|
Return type: | string Request as string |
Return the response set in $this->setResponse()
Return type: | string |
---|
Close the connection (dummy)
Set the HTTP response(s) to be returned by this adapter
Parameters: | ZendHttpResponse|array|string – |
---|