PHP Class Elgg\PersistentLoginTest

Inheritance: extends TestCase
Afficher le fichier Open project: elgg/elgg

Protected Properties

Свойство Type Description
$cryptoMock PHPUnit_Framework_MockObject_MockObject
$dbMock PHPUnit_Framework_MockObject_MockObject
$lastCookieSet ElggCookie
$mockHash string
$mockToken string
$session ElggSession
$svc PersistentLoginService
$thirtyDaysAgo integer
$timeSlept integer
$user123 PHPUnit_Framework_MockObject_MockObject

Méthodes publiques

Méthode Description
getMockElggUser ( $guid ) mock \ElggUser which will return the GUID on ->guid reads
mock_deleteAll ( $sql )
mock_deleteData ( $sql )
mock_elgg_set_cookie ( ElggCookie $cookie )
mock_getDataRow ( $sql )
mock_get_user ( $guid )
mock_insertData ( $sql )
mock_sanitizeString ( $string )
mock_sleep ( $seconds )
setUp ( )
testBootSessionWithInvalidLegacyTokenCausesDelayAndFailure ( )
testChangingOwnPasswordDeletesAllHashesAndMakesPersistent ( )
testChangingOwnPasswordWithNoCookieDoesntMakePersistent ( )
testChangingSomeoneElsesPasswordDoesntMakePersistent ( )
testGetPersistedUser_invalidModernToken ( )
testGettingMissingUserFromKnownHashReturnsNull ( )
testGettingUserFromKnownHashReturnsUser ( )
testGettingUserFromMissingHashReturnsNull ( )
testGettingUserFromValidClientReturnsUser ( )
testLegacyCookiesAreReplacedInDbCookieAndSession ( )
testLoginSavesHashAndPutsTokenInCookieAndSession ( )
testModernTokenCookiesAreNotReplaced ( )
testRemoveDeletesHashAndDeletesTokenFromCookieAndSession ( )
testRemoveWithoutCookieCantDeleteHash ( )
testReplaceLegacyTokenWithNoCookieDoesNothing ( )

Méthodes protégées

Méthode Description
getSvcWithCookie ( string $cookie_token = '' ) : PersistentLoginService

Method Details

getMockElggUser() public méthode

mock \ElggUser which will return the GUID on ->guid reads
public getMockElggUser ( $guid )

getSvcWithCookie() protected méthode

protected getSvcWithCookie ( string $cookie_token = '' ) : PersistentLoginService
$cookie_token string
Résultat PersistentLoginService

mock_deleteAll() public méthode

public mock_deleteAll ( $sql )

mock_deleteData() public méthode

public mock_deleteData ( $sql )

mock_getDataRow() public méthode

public mock_getDataRow ( $sql )

mock_get_user() public méthode

public mock_get_user ( $guid )

mock_insertData() public méthode

public mock_insertData ( $sql )

mock_sanitizeString() public méthode

public mock_sanitizeString ( $string )

mock_sleep() public méthode

public mock_sleep ( $seconds )

setUp() public méthode

public setUp ( )

testBootSessionWithInvalidLegacyTokenCausesDelayAndFailure() public méthode

testChangingOwnPasswordDeletesAllHashesAndMakesPersistent() public méthode

testChangingOwnPasswordWithNoCookieDoesntMakePersistent() public méthode

testChangingSomeoneElsesPasswordDoesntMakePersistent() public méthode

testGetPersistedUser_invalidModernToken() public méthode

testGettingMissingUserFromKnownHashReturnsNull() public méthode

testGettingUserFromKnownHashReturnsUser() public méthode

testGettingUserFromMissingHashReturnsNull() public méthode

testGettingUserFromValidClientReturnsUser() public méthode

testLegacyCookiesAreReplacedInDbCookieAndSession() public méthode

testLoginSavesHashAndPutsTokenInCookieAndSession() public méthode

testModernTokenCookiesAreNotReplaced() public méthode

testRemoveDeletesHashAndDeletesTokenFromCookieAndSession() public méthode

testRemoveWithoutCookieCantDeleteHash() public méthode

testReplaceLegacyTokenWithNoCookieDoesNothing() public méthode

Property Details

$cryptoMock protected_oe property

protected PHPUnit_Framework_MockObject_MockObject $cryptoMock
Résultat PHPUnit_Framework_MockObject_MockObject

$dbMock protected_oe property

protected PHPUnit_Framework_MockObject_MockObject $dbMock
Résultat PHPUnit_Framework_MockObject_MockObject

$lastCookieSet protected_oe property

protected ElggCookie $lastCookieSet
Résultat ElggCookie

$mockHash protected_oe property

protected string $mockHash
Résultat string

$mockToken protected_oe property

protected string $mockToken
Résultat string

$session protected_oe property

protected ElggSession $session
Résultat ElggSession

$svc protected_oe property

protected PersistentLoginService,Elgg $svc
Résultat PersistentLoginService

$thirtyDaysAgo protected_oe property

protected int $thirtyDaysAgo
Résultat integer

$timeSlept protected_oe property

protected int $timeSlept
Résultat integer

$user123 protected_oe property

protected PHPUnit_Framework_MockObject_MockObject $user123
Résultat PHPUnit_Framework_MockObject_MockObject