/** * Prepares the environment before running a test. */ protected function setUp() { $this->instance = new Instance('access_key', 'secret_access_key'); $adapter = new \Zend\Http\Client\Adapter\Test(); $client = new \Zend\Http\Client(null, array('adapter' => $adapter)); $this->adapter = $adapter; Instance::setDefaultHTTPClient($client); }
/** * Get the last HTTP response * * @return Zend\Http\Response */ public function getLastHttpResponse() { return $this->ec2->getHttpClient()->getLastResponse(); }