PHP Class Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Google\TwoFactorProviderTest

Show file Open project: scheb/two-factor-bundle

Public Methods

Method Description
beginAuthentication_interfaceNotImplemented_returnFalse ( )
beginAuthentication_twoFactorDisabled_returnFalse ( )
beginAuthentication_twoFactorPossible_returnTrue ( )
getTrustedOptions ( ) : array Test values for trusted option in requestAuthenticationCode.
requestAuthenticationCode_invalidCode_displayFlashMessage ( )
requestAuthenticationCode_notPostRequest_displayForm ( )
requestAuthenticationCode_postRequest_validateCode ( )
requestAuthenticationCode_trustedOption_assignToTemplate ( $trustedOption )
requestAuthenticationCode_validCode_returnRedirect ( )
requestAuthenticationCode_validCode_setAuthenticated ( )
setUp ( )

Private Methods

Method Description
getAuthenticationContext ( PHPUnit_Framework_MockObject_MockObject $user = null, PHPUnit_Framework_MockObject_MockObject $request = null, PHPUnit_Framework_MockObject_MockObject $session = null, boolean $useTrustedOption = true ) : PHPUnit_Framework_MockObject_MockObject
getFlashBag ( ) : PHPUnit_Framework_MockObject_MockObject
getPostCodeRequest ( $code = 12345 ) : PHPUnit_Framework_MockObject_MockObject
getRequest ( ) : PHPUnit_Framework_MockObject_MockObject
getSession ( PHPUnit_Framework_MockObject_MockObject $flashBag = null ) : PHPUnit_Framework_MockObject_MockObject
getUser ( string $secret = 'SECRET' ) : PHPUnit_Framework_MockObject_MockObject
stubGoogleAuthenticator ( boolean $status ) Stub the GoogleAuthenticator checkCode method.

Method Details

beginAuthentication_interfaceNotImplemented_returnFalse() public method

beginAuthentication_twoFactorDisabled_returnFalse() public method

beginAuthentication_twoFactorPossible_returnTrue() public method

getTrustedOptions() public method

Test values for trusted option in requestAuthenticationCode.
public getTrustedOptions ( ) : array
return array

requestAuthenticationCode_invalidCode_displayFlashMessage() public method

requestAuthenticationCode_notPostRequest_displayForm() public method

requestAuthenticationCode_postRequest_validateCode() public method

requestAuthenticationCode_trustedOption_assignToTemplate() public method

requestAuthenticationCode_validCode_returnRedirect() public method

requestAuthenticationCode_validCode_setAuthenticated() public method

setUp() public method

public setUp ( )