/** * @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()); }