ManagerTest
extends TestCase
in package
Uses
ReflectionTrait
Authentication manager test class.
Tags
Table of Contents
- testAllowsUserIlsLoginConfiguration() : void
- Confirm configurability of allowsUserIlsLogin().
- testAllowsUserIlsLoginDefault() : void
- Confirm default setting of allowsUserIlsLogin().
- testAuthException() : void
- Test unsuccessful login (\VuFind\Exception\Auth)
- testCheckForExpiredCredentials() : void
- Test checkForExpiredCredentials
- testCreate() : void
- Test create
- testDefaultConfig() : void
- Test that database is the default method.
- testGetAuthClassForTemplateRendering() : void
- Test getAuthClassForTemplateRendering
- testGetDefaultLoginTarget() : void
- Test getDefaultLoginTarget
- testGetLoginTargets() : void
- Test getLoginTargets
- testGetSelectableAuthOptions() : void
- Test getSelectableAuthOptions
- testGetSessionInitiator() : void
- Test getSessionInitiator
- testIncorrectCsrf() : void
- Test CSRF failure (same setup as successful login, but with bad token)
- testLoginDisabled() : void
- Test that login can be disabled by configuration.
- testLoginEnabled() : void
- Test that login is enabled by default.
- testLogoutWithDestruction() : void
- Test logout (with destruction)
- testLogoutWithoutDestruction() : void
- Test logout (without destruction)
- testMissingCsrf() : void
- Test CSRF failure (same setup as successful login, but minus token)
- testPasswordSecurityException() : void
- Test unsuccessful login (\VuFind\Exception\PasswordSecurity)
- testSuccessfulLogin() : void
- Test successful login
- testSupportsCreation() : void
- Test supportsCreation
- testSupportsEmailChange() : void
- Test supportsEmailChange
- testSupportsPasswordChange() : void
- Test supportsPasswordChange
- testSupportsRecovery() : void
- Test supportsRecovery
- testSwitchingFailure() : void
- Test security features of switching between auth options (part 2).
- testSwitchingSuccess() : void
- Test security features of switching between auth options (part 1).
- testUnanticipatedException() : void
- Test that unexpected exceptions get mapped to technical errors.
- testUpdatePassword() : void
- Test update password
- testUserHasLoggedOut() : void
- Test userHasLoggedOut
- testUserLoginFromSession() : void
- Test the persistence of a user account in the session.
- callMethod() : mixed
- Call protected or private method for side-effect and result.
- getManager() : Manager
- Get a manager object to test with.
- getMockPluginManager() : PluginManager
- Get a mock plugin manager.
- getMockRequest() : MockObject|Request
- Get a mock request object
- getMockSessionManager() : MockObject|SessionManager
- Get a mock session manager.
- getMockUser() : MockObject|UserEntityInterface
- Get a mock user object
- getProperty() : mixed
- Return protected or private property.
- setProperty() : void
- Set protected or private property.
Methods
testAllowsUserIlsLoginConfiguration()
Confirm configurability of allowsUserIlsLogin().
public
testAllowsUserIlsLoginConfiguration() : void
Return values
void —testAllowsUserIlsLoginDefault()
Confirm default setting of allowsUserIlsLogin().
public
testAllowsUserIlsLoginDefault() : void
Return values
void —testAuthException()
Test unsuccessful login (\VuFind\Exception\Auth)
public
testAuthException() : void
Return values
void —testCheckForExpiredCredentials()
Test checkForExpiredCredentials
public
testCheckForExpiredCredentials() : void
Return values
void —testCreate()
Test create
public
testCreate() : void
Return values
void —testDefaultConfig()
Test that database is the default method.
public
testDefaultConfig() : void
Return values
void —testGetAuthClassForTemplateRendering()
Test getAuthClassForTemplateRendering
public
testGetAuthClassForTemplateRendering() : void
Return values
void —testGetDefaultLoginTarget()
Test getDefaultLoginTarget
public
testGetDefaultLoginTarget() : void
Return values
void —testGetLoginTargets()
Test getLoginTargets
public
testGetLoginTargets() : void
Return values
void —testGetSelectableAuthOptions()
Test getSelectableAuthOptions
public
testGetSelectableAuthOptions() : void
Return values
void —testGetSessionInitiator()
Test getSessionInitiator
public
testGetSessionInitiator() : void
Return values
void —testIncorrectCsrf()
Test CSRF failure (same setup as successful login, but with bad token)
public
testIncorrectCsrf() : void
Return values
void —testLoginDisabled()
Test that login can be disabled by configuration.
public
testLoginDisabled() : void
Return values
void —testLoginEnabled()
Test that login is enabled by default.
public
testLoginEnabled() : void
Return values
void —testLogoutWithDestruction()
Test logout (with destruction)
public
testLogoutWithDestruction() : void
Return values
void —testLogoutWithoutDestruction()
Test logout (without destruction)
public
testLogoutWithoutDestruction() : void
Return values
void —testMissingCsrf()
Test CSRF failure (same setup as successful login, but minus token)
public
testMissingCsrf() : void
Return values
void —testPasswordSecurityException()
Test unsuccessful login (\VuFind\Exception\PasswordSecurity)
public
testPasswordSecurityException() : void
Return values
void —testSuccessfulLogin()
Test successful login
public
testSuccessfulLogin() : void
Return values
void —testSupportsCreation()
Test supportsCreation
public
testSupportsCreation() : void
Return values
void —testSupportsEmailChange()
Test supportsEmailChange
public
testSupportsEmailChange() : void
Return values
void —testSupportsPasswordChange()
Test supportsPasswordChange
public
testSupportsPasswordChange() : void
Return values
void —testSupportsRecovery()
Test supportsRecovery
public
testSupportsRecovery() : void
Return values
void —testSwitchingFailure()
Test security features of switching between auth options (part 2).
public
testSwitchingFailure() : void
Return values
void —testSwitchingSuccess()
Test security features of switching between auth options (part 1).
public
testSwitchingSuccess() : void
Return values
void —testUnanticipatedException()
Test that unexpected exceptions get mapped to technical errors.
public
testUnanticipatedException() : void
Return values
void —testUpdatePassword()
Test update password
public
testUpdatePassword() : void
Return values
void —testUserHasLoggedOut()
Test userHasLoggedOut
public
testUserHasLoggedOut() : void
Return values
void —testUserLoginFromSession()
Test the persistence of a user account in the session.
public
testUserLoginFromSession() : void
Return values
void —callMethod()
Call protected or private method for side-effect and result.
protected
callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed
Uses PHP's reflection API in order to modify method accessibility.
Parameters
- $object : object|string
-
Object or class name
- $method : string
-
Method name
- $arguments : array<string|int, mixed> = []
-
Method arguments
Tags
Return values
mixed —getManager()
Get a manager object to test with.
protected
getManager([array<string|int, mixed> $config = [] ][, UserSessionPersistenceInterface|null $userSession = null ][, SessionManager|null $sessionManager = null ][, PluginManager|null $pm = null ]) : Manager
Parameters
- $config : array<string|int, mixed> = []
-
Configuration
- $userSession : UserSessionPersistenceInterface|null = null
-
User session persistence service
- $sessionManager : SessionManager|null = null
-
Session manager
- $pm : PluginManager|null = null
-
Authentication plugin manager
Return values
Manager —getMockPluginManager()
Get a mock plugin manager.
protected
getMockPluginManager() : PluginManager
Return values
PluginManager —getMockRequest()
Get a mock request object
protected
getMockRequest() : MockObject|Request
Return values
MockObject|Request —getMockSessionManager()
Get a mock session manager.
protected
getMockSessionManager() : MockObject|SessionManager
Return values
MockObject|SessionManager —getMockUser()
Get a mock user object
protected
getMockUser() : MockObject|UserEntityInterface
Return values
MockObject|UserEntityInterface —getProperty()
Return protected or private property.
protected
getProperty(object|string $object, string $property) : mixed
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
Tags
Return values
mixed —setProperty()
Set protected or private property.
protected
setProperty(object|string $object, string $property, mixed $value) : void
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
- $value : mixed
-
Property value