Exemplo n.º 1
0
 /**
  * Check the authentication and the results (token, storage_url, cdn_url)
  *
  * @return void
  */
 public function testAuthenticate()
 {
     $this->_files->getHttpClient()->setAdapter($this->_httpClientAdapterTest);
     $this->_httpClientAdapterTest->setResponse($this->_loadResponse(__FUNCTION__));
     $this->assertTrue($this->_files->authenticate(), 'Authentication failed');
     $this->assertTrue($this->_files->isSuccessful(), 'Authentication call failed');
     $this->assertEquals($this->_files->getToken(), '0f0223cd-f157-4d04-bb2d-ccda1a5643af', 'The token is not valid');
     $this->assertEquals($this->_files->getStorageUrl(), 'https://storage101.ord1.clouddrive.com/v1/test', 'The storage URL is not valid');
     $this->assertEquals($this->_files->getCdnUrl(), 'https://cdn2.clouddrive.com/v1/test', 'The CDN URL is not valid');
 }