/**
  * SetUpBerofeClass
  */
 public function setUp()
 {
     $this->rackspace = new Zend_Service_Rackspace_Servers('foo', 'bar');
     $this->httpClientAdapterTest = new Zend_Http_Client_Adapter_Test();
     $this->rackspace->getHttpClient()->setAdapter($this->httpClientAdapterTest);
     // authentication (from a file)
     $this->httpClientAdapterTest->setResponse(self::loadResponse('../../_files/testAuthenticate'));
     $this->assertTrue($this->rackspace->authenticate(), 'Authentication failed');
     // load the HTTP response (from a file)
     $this->httpClientAdapterTest->setResponse($this->loadResponse($this->getName()));
 }
 /**
  * Sets up this test case
  *
  * @return void
  */
 public function setUp()
 {
     if (!constant('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_ENABLED')) {
         $this->markTestSkipped('Zend_Service_Rackspace_Servers_OnlineTest tests are not enabled');
     }
     if (!defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER') || !defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY')) {
         $this->markTestSkipped('Constants User and Key have to be set.');
     }
     $this->rackspace = new Zend_Service_Rackspace_Servers(TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER, TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY);
     $this->httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();
     $this->rackspace->getHttpClient()->setAdapter($this->httpClientAdapterSocket);
     // terms of use compliance: safe delay between each test
     sleep(2);
 }
 /**
  * Get the last HTTP response
  * 
  * @return Zend_Http_Response 
  */
 public function getLastHttpResponse()
 {
     return $this->rackspace->getHttpClient()->getLastResponse();
 }