/** * 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()); }
/** * @dataProvider getUserUrls */ public function testCanFetchTheUserAndPublicKeyInTheUrl($url, $user, $publicKey) { $userUrl = UserUrl::factory($url); $this->assertSame($user, $userUrl->getUser()); $this->assertSame($publicKey, $userUrl->getPublicKey()); }