Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Trusted\TrustedFilterTest::requestAuthenticationCode_shouldCheckIfTrustedIsAllowedByContext PHP Метод

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

    public function requestAuthenticationCode_shouldCheckIfTrustedIsAllowedByContext()
    {
        $context = $this->getAuthenticationContext();
        $context->expects($this->once())->method('isAuthenticated')->willReturn(true);
        $context->expects($this->once())->method('useTrustedOption')->willReturn(false);
        $this->authHandler->expects($this->once())->method('requestAuthenticationCode')->with($context)->willReturn(new Response('<form></form>'));
        $this->cookieManager->expects($this->never())->method('createTrustedCookie');
        $returnValue = $this->trustedFilter->requestAuthenticationCode($context);
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $returnValue);
    }