/** * @covers OAuth\OAuth2\Service\Bitly::__construct * @covers OAuth\OAuth2\Service\Bitly::getAuthorizationEndpoint */ public function testGetAuthorizationEndpoint() { $service = new Bitly($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $this->getMock('\\OAuth\\Common\\Http\\Client\\ClientInterface'), $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface')); $this->assertSame('https://bitly.com/oauth/authorize', $service->getAuthorizationEndpoint()->getAbsoluteUri()); }
/** * @covers OAuth\OAuth2\Service\Bitly::__construct * @covers OAuth\OAuth2\Service\Bitly::getAuthorizationEndpoint */ public function testGetAuthorizationEndpoint() { $service = new Bitly($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $this->getMock('\\Buzz\\Browser'), $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface')); $this->assertSame('https://bitly.com/oauth/authorize', (string) $service->getAuthorizationEndpoint()); }