/** * @covers OAuth\OAuth2\Service\Foursquare::__construct * @covers OAuth\OAuth2\Service\Foursquare::parseAccessTokenResponse */ public function testParseAccessTokenResponseValidWithoutRefreshToken() { $client = $this->getMock('\\OAuth\\Common\\Http\\Client\\ClientInterface'); $client->expects($this->once())->method('retrieveResponse')->will($this->returnValue('{"access_token":"foo","expires_in":"bar"}')); $service = new Foursquare($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $client, $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface')); $this->assertInstanceOf('\\OAuth\\OAuth2\\Token\\StdOAuth2Token', $service->requestAccessToken('foo')); }