Esempio n. 1
0
 public function testGetRedirectUrlReturnsUserAuthorizationUrlWithParameters()
 {
     $config = array('consumerKey'=>'12345','consumerSecret'=>'54321',
         'userAuthorizationUrl'=>'http://www.example.com/authorize');
     $consumer = new Consumer48231($config);
     $params = array('foo'=>'bar');
     $uauth = new OAuth\Http\UserAuthorization($consumer, $params);
     $token = new OAuth\Token\Request;
     $token->setParams(array('oauth_token'=>'123456', 'oauth_token_secret'=>'654321'));
     $redirectUrl = $consumer->getRedirectUrl($params, $token, $uauth);
     $this->assertEquals(
         'http://www.example.com/authorize?oauth_token=123456&oauth_callback=http%3A%2F%2Fwww.example.com%2Flocal&foo=bar',
         $redirectUrl
     );
 }