Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Email\TwoFactorProviderTest::requestAuthenticationCode_notPostRequest_displayForm PHP Метод

requestAuthenticationCode_notPostRequest_displayForm() публичный Метод

    public function requestAuthenticationCode_notPostRequest_displayForm()
    {
        $request = $this->getRequest();
        $context = $this->getAuthenticationContext(null, $request);
        //Mock the CodeGenerator 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());
    }