Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Session\SessionFlagGeneratorTest::getSessionFlag_withProviderKey_returnSessionFlag PHP Method

getSessionFlag_withProviderKey_returnSessionFlag() public method

    public function getSessionFlag_withProviderKey_returnSessionFlag()
    {
        $token = $this->createMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken');
        $token->expects($this->once())->method('getUsername')->willReturn('username');
        $token->expects($this->once())->method('getProviderKey')->willReturn('providerKey');
        $returnValue = $this->sessionFlagGenerator->getSessionFlag('twoFactorProvider', $token);
        $this->assertEquals('two_factor_twoFactorProvider_providerKey_username', $returnValue);
    }