public function testGetUserInformation()
 {
     $this->markTestSkipped('Test will work from PHPUnit 3.7 onwards. See: https://github.com/sebastianbergmann/phpunit-mock-objects/issues/47.');
     $this->mockBuzz($this->userResponse);
     $userResponse = $this->resourceOwner->getUserInformation('access_token');
     $this->assertEquals('bar', $userResponse->getUsername());
     $this->assertEquals('access_token', $userResponse->getAccessToken());
 }
 public function testGetUserInformation()
 {
     $this->mockBuzz($this->userResponse, 'application/json; charset=utf-8');
     $accessToken = array('oauth_token' => 'token', 'oauth_token_secret' => 'secret');
     $userResponse = $this->resourceOwner->getUserInformation($accessToken);
     $this->assertEquals('1', $userResponse->getUsername());
     $this->assertEquals('bar', $userResponse->getNickname());
     $this->assertEquals($accessToken['oauth_token'], $userResponse->getAccessToken());
     $this->assertNull($userResponse->getRefreshToken());
     $this->assertNull($userResponse->getExpiresIn());
 }
 /**
  * {@inheritdoc}
  */
 public function getUserInformation(array $accessToken, array $extraParameters = array())
 {
     if ($this->options['include_email']) {
         $this->options['infos_url'] = $this->normalizeUrl($this->options['infos_url'], array('include_email' => 'true'));
     }
     return parent::getUserInformation($accessToken, $extraParameters);
 }
 /**
  * Override to replace {guid} in the infos_url with the authenticating user's yahoo id
  *
  * {@inheritDoc}
  */
 public function getUserInformation(array $accessToken, array $extraParameters = array())
 {
     $this->options['infos_url'] = str_replace('{guid}', $accessToken['xoauth_yahoo_guid'], $this->options['infos_url']);
     return parent::getUserInformation($accessToken, $extraParameters);
 }