Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Session\SessionFlagManagerTest::setComplete_completeTwoFactor_flagIsSetTrue PHP Méthode

setComplete_completeTwoFactor_flagIsSetTrue() public méthode

    public function setComplete_completeTwoFactor_flagIsSetTrue()
    {
        $token = $this->createMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface');
        //Mock the SessionFlagGenerator
        $this->flagGenerator->expects($this->once())->method('getSessionFlag')->with('providerName', $token)->willReturn('session_flag');
        //Mock the Session
        $this->session->expects($this->once())->method('set')->with('session_flag', true);
        $this->sessionFlagManager->setComplete('providerName', $token);
    }