KnpU\OAuth2ClientBundle\Tests\Security\Authenticator\SocialAuthenticatorTest::testFetchAccessTokenSimplyReturns PHP Method

testFetchAccessTokenSimplyReturns() public method

    public function testFetchAccessTokenSimplyReturns()
    {
        $authenticator = new StubSocialAuthenticator();
        $client = $this->prophesize('KnpU\\OAuth2ClientBundle\\Client\\OAuth2Client');
        $client->getAccessToken()->willReturn('expected_access_token');
        $actualToken = $authenticator->doFetchAccessToken($client->reveal());
        $this->assertEquals('expected_access_token', $actualToken);
    }