Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Google\TwoFactorProviderTest::requestAuthenticationCode_notPostRequest_displayForm PHP Method

requestAuthenticationCode_notPostRequest_displayForm() public method

    public function requestAuthenticationCode_notPostRequest_displayForm()
    {
        $request = $this->getRequest();
        $context = $this->getAuthenticationContext(null, $request);
        //Mock the GoogleAuthenticator never called
        $this->authenticator->expects($this->never())->method('checkCode');
        //Mock the template engine
        $this->renderer->expects($this->once())->method('render')->willReturn(new Response('<form></form>'));
        $returnValue = $this->provider->requestAuthenticationCode($context);
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $returnValue);
        $this->assertEquals('<form></form>', $returnValue->getContent());
    }