_adapter = new Zend_Http_Client_Adapter_Test; $this->_simpy->getHttpClient()->setAdapter($this->_adapter); } /** * Proxy all method calls to the service consumer object using a test * HTTP client adapter and reading responses from local files. * * @param string $name Name of the method called * @param array $args Arguments passed in the method call * @return mixed Return value of the called method */ public function __call($name, array $args) { $file = $this->_getFilePath($name); $body = file_get_contents($file); $this->_adapter->setResponse( 'HTTP/1.1 200 OK' . "\r\n" . 'Content-Type: text/xml' . "\r\n" . "\r\n" . $body ); $return = call_user_func_array( array($this->_simpy, $name), $args ); return $return; } }