Ask for Google authentication code.
public requestAuthenticationCode ( Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface $context ) : |
||
$context | Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface | |
return |
/** * @test */ public function requestAuthenticationCode_validCode_returnRedirect() { $request = $this->getPostCodeRequest(); $context = $this->getAuthenticationContext(null, $request); $this->stubGoogleAuthenticator(true); $returnValue = $this->provider->requestAuthenticationCode($context); $this->assertInstanceOf("Symfony\\Component\\HttpFoundation\\RedirectResponse", $returnValue); $this->assertEquals('/some/path', $returnValue->getTargetUrl()); }