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