PHP 클래스 Elgg\PersistentLoginTest

상속: extends TestCase
파일 보기 프로젝트 열기: elgg/elgg

보호된 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
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 ( )

보호된 메소드들

메소드 설명
getSvcWithCookie ( string $cookie_token = '' ) : PersistentLoginService

메소드 상세

getMockElggUser() 공개 메소드

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

getSvcWithCookie() 보호된 메소드

protected getSvcWithCookie ( string $cookie_token = '' ) : PersistentLoginService
$cookie_token string
리턴 PersistentLoginService

mock_deleteAll() 공개 메소드

public mock_deleteAll ( $sql )

mock_deleteData() 공개 메소드

public mock_deleteData ( $sql )

mock_getDataRow() 공개 메소드

public mock_getDataRow ( $sql )

mock_get_user() 공개 메소드

public mock_get_user ( $guid )

mock_insertData() 공개 메소드

public mock_insertData ( $sql )

mock_sanitizeString() 공개 메소드

public mock_sanitizeString ( $string )

mock_sleep() 공개 메소드

public mock_sleep ( $seconds )

setUp() 공개 메소드

public setUp ( )

testBootSessionWithInvalidLegacyTokenCausesDelayAndFailure() 공개 메소드

testChangingOwnPasswordDeletesAllHashesAndMakesPersistent() 공개 메소드

testChangingOwnPasswordWithNoCookieDoesntMakePersistent() 공개 메소드

testChangingSomeoneElsesPasswordDoesntMakePersistent() 공개 메소드

testGetPersistedUser_invalidModernToken() 공개 메소드

testGettingMissingUserFromKnownHashReturnsNull() 공개 메소드

testGettingUserFromKnownHashReturnsUser() 공개 메소드

testGettingUserFromMissingHashReturnsNull() 공개 메소드

testGettingUserFromValidClientReturnsUser() 공개 메소드

testLegacyCookiesAreReplacedInDbCookieAndSession() 공개 메소드

testLoginSavesHashAndPutsTokenInCookieAndSession() 공개 메소드

testModernTokenCookiesAreNotReplaced() 공개 메소드

testRemoveDeletesHashAndDeletesTokenFromCookieAndSession() 공개 메소드

testRemoveWithoutCookieCantDeleteHash() 공개 메소드

testReplaceLegacyTokenWithNoCookieDoesNothing() 공개 메소드

프로퍼티 상세

$cryptoMock 보호되어 있는 프로퍼티

protected PHPUnit_Framework_MockObject_MockObject $cryptoMock
리턴 PHPUnit_Framework_MockObject_MockObject

$dbMock 보호되어 있는 프로퍼티

protected PHPUnit_Framework_MockObject_MockObject $dbMock
리턴 PHPUnit_Framework_MockObject_MockObject

$lastCookieSet 보호되어 있는 프로퍼티

protected ElggCookie $lastCookieSet
리턴 ElggCookie

$mockHash 보호되어 있는 프로퍼티

protected string $mockHash
리턴 string

$mockToken 보호되어 있는 프로퍼티

protected string $mockToken
리턴 string

$session 보호되어 있는 프로퍼티

protected ElggSession $session
리턴 ElggSession

$svc 보호되어 있는 프로퍼티

protected PersistentLoginService,Elgg $svc
리턴 PersistentLoginService

$thirtyDaysAgo 보호되어 있는 프로퍼티

protected int $thirtyDaysAgo
리턴 integer

$timeSlept 보호되어 있는 프로퍼티

protected int $timeSlept
리턴 integer

$user123 보호되어 있는 프로퍼티

protected PHPUnit_Framework_MockObject_MockObject $user123
리턴 PHPUnit_Framework_MockObject_MockObject