Example #1
0
 /**
  * Get a URL for the user endpoint
  *
  * @return Http\UserUrl
  */
 public function getUserUrl()
 {
     $url = sprintf($this->getBaseUrl() . '/users/%s.json', $this->getUser());
     return Http\UserUrl::factory($url, $this->getConfig('privateKey'), $this->getPublicKey());
 }
Example #2
0
 /**
  * @dataProvider getUserUrls
  */
 public function testCanFetchTheUserAndPublicKeyInTheUrl($url, $user, $publicKey)
 {
     $userUrl = UserUrl::factory($url);
     $this->assertSame($user, $userUrl->getUser());
     $this->assertSame($publicKey, $userUrl->getPublicKey());
 }