Ejemplo n.º 1
0
 /**
  * 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()));
 }
Ejemplo n.º 2
0
 /**
  * Test authentication
  */
 public function testAuthentication()
 {
     $this->filename = __METHOD__;
     $this->assertTrue($this->rackspace->authenticate());
 }