ZF-7009: Keep function signature in "setResponse" and "addResponse"
Description
Zend_Http_Client_Adapter_Test::setResponse() and Zend_Http_Client_Adapter_Test::addResponse does not keep the same signature. Please change addResponse to act the same as setResponse e.g. convert response object to string.
Patch:
--- Test.org.php 2009-06-14 12:11:53.000000000 +0300
+++ Test.php 2009-06-14 12:11:05.000000000 +0300
@@ -168,10 +168,14 @@
/**
* Add another response to the response buffer.
*
- * @param string $response
+ * @param string Zend_Http_Response|$response
*/
public function addResponse($response)
{
+ if ($response instanceof Zend_Http_Response) {
+ $response = $response->asString();
+ }
+
$this->responses[] = $response;
}
Comments
Posted by Shahar Evron (shahar) on 2009-06-14T06:52:42.000+0000
Patch applied + tests added in rev. 16066