Esempio n. 1
0
 /**
  * @covers OAuth\OAuth1\Service\AbstractService::getAuthorizationUri
  * @covers OAuth\OAuth1\Service\AbstractService::getAuthorizationEndpoint
  */
 public function testGetAuthorizationUriWithParameters()
 {
     $service = new Mock($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $this->getMock('\\OAuth\\Common\\Http\\Client\\ClientInterface'), $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface'), $this->getMock('\\OAuth\\OAuth1\\Signature\\SignatureInterface'), $this->getMock('\\OAuth\\Common\\Http\\Uri\\UriInterface'));
     $this->assertSame('http://pieterhordijk.com/auth?foo=bar&baz=beer', $service->getAuthorizationUri(array('foo' => 'bar', 'baz' => 'beer'))->getAbsoluteUri());
 }
Esempio n. 2
0
 /**
  * @covers OAuth\OAuth1\Service\AbstractService::getAuthorizationUri
  * @covers OAuth\OAuth1\Service\AbstractService::getAuthorizationEndpoint
  */
 public function testGetAuthorizationUriWithParameters()
 {
     $service = new Mock($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $this->getMock('\\Buzz\\Browser'), $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface'), $this->getMock('\\OAuth\\OAuth1\\Signature\\SignatureInterface'));
     $this->assertSame('http://pieterhordijk.com/auth?foo=bar&baz=beer&oauth_token=', (string) $service->getAuthorizationUri(['foo' => 'bar', 'baz' => 'beer', 'oauth_token' => '']));
 }