Example #1
0
 public function testGetToken()
 {
     $provider = new \Cloudberry\Provider(API_USERNAME, API_PASSWORD);
     $token = $provider->getToken();
     $this->assertInstanceOf('stdClass', $token);
     $this->assertNotEmpty($token->access_token);
 }
Example #2
0
 public function testListUsers()
 {
     $provider = new \Cloudberry\Provider(API_USERNAME, API_PASSWORD);
     $token = $provider->getToken();
     $this->assertInstanceOf('stdClass', $token);
     $this->assertNotEmpty($token->access_token);
     $u = new \Cloudberry\Users($token->access_token);
     $users = $u->getUsers();
     $this->assertInternalType('array', $users);
 }
 public function testListPackages()
 {
     $provider = new \Cloudberry\Provider(API_USERNAME, API_PASSWORD);
     $token = $provider->getToken();
     $this->assertInstanceOf('stdClass', $token);
     $this->assertNotEmpty($token->access_token);
     $d = new \Cloudberry\Destinations($token->access_token);
     $destinations = $d->getDestinations();
     $this->assertInternalType('array', $destinations);
 }