/** * @todo are the dummy values for user and key okay? */ public function setUp() { $this->rackspace = new Servers('foo', 'bar'); $this->httpClientAdapterTest = new HttpTest(); $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())); }
/** * Test authentication */ public function testAuthentication() { $this->assertTrue(self::$rackspace->authenticate()); }
/** * Test authentication */ public function testAuthentication() { $this->filename = __METHOD__; $this->assertTrue(self::$rackspace->authenticate()); }