/** * Get a URL for the key endpoint * * @param string $publicKey Public key * @return Http\KeyUrl */ public function getKeyUrl($publicKey) { $url = sprintf($this->getBaseUrl() . '/keys/%s', $publicKey); return Http\KeyUrl::factory($url, $this->getConfig('privateKey'), $this->getPublicKey()); }
/** * @dataProvider getKeyUrls */ public function testCanFetchTheGroupInTheUrl($url, $groupName) { $keyUrl = KeyUrl::factory($url); $this->assertSame($groupName, $keyUrl->getKey()); }