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

testFetchAccessTokenThrowsAuthenticationException() public method

    public function testFetchAccessTokenThrowsAuthenticationException()
    {
        $authenticator = new StubSocialAuthenticator();
        $client = $this->prophesize('KnpU\\OAuth2ClientBundle\\Client\\OAuth2Client');
        $client->getAccessToken()->willThrow(new MissingAuthorizationCodeException());
        $authenticator->doFetchAccessToken($client->reveal());
    }