Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Session\SessionFlagManagerTest::isNotAuthenticated_hasFlagSet_returnCorrectBoolean PHP Method

isNotAuthenticated_hasFlagSet_returnCorrectBoolean() public method

public isNotAuthenticated_hasFlagSet_returnCorrectBoolean ( $getReturnValue, $expectedReturnValue )
    public function isNotAuthenticated_hasFlagSet_returnCorrectBoolean($getReturnValue, $expectedReturnValue)
    {
        $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('isStarted')->willReturn($this->returnValue(true));
        $this->session->expects($this->once())->method('has')->with('session_flag')->willReturn(true);
        $this->session->expects($this->once())->method('get')->with('session_flag')->willReturn($getReturnValue);
        $returnValue = $this->sessionFlagManager->isNotAuthenticated('providerName', $token);
        $this->assertEquals($expectedReturnValue, $returnValue);
    }