LDAPTest
extends TestCase
in package
Uses
ReflectionTrait
LDAP authentication test class.
Tags
Table of Contents
- getAuthConfig() : Config
- Get a working configuration for the LDAP object
- getAuthObject() : LDAP
- Get an authentication object.
- testCaseNormalization() : void
- Test case normalization of parameters.
- testCreateIsDisallowed() : void
- Test account creation is disallowed.
- testLoginWithBlankPassword() : void
- Test login with blank password.
- testLoginWithBlankUsername() : void
- Test login with blank username.
- testWithMissingBaseDN() : void
- Verify that missing baseDN causes failure.
- testWithMissingHost() : void
- Verify that missing host causes failure.
- testWithMissingPort() : void
- Verify that missing port causes failure.
- testWithMissingUid() : void
- Verify that missing UID causes failure.
- callMethod() : mixed
- Call protected or private method for side-effect and result.
- getLoginRequest() : Request
- Support method -- get parameters to log into an account (but allow override of individual parameters so we can test different scenarios).
- getProperty() : mixed
- Return protected or private property.
- setProperty() : void
- Set protected or private property.
Methods
getAuthConfig()
Get a working configuration for the LDAP object
public
getAuthConfig() : Config
Return values
Config —getAuthObject()
Get an authentication object.
public
getAuthObject([Config|null $config = null ]) : LDAP
Parameters
- $config : Config|null = null
-
Configuration to use (null for default)
Return values
LDAP —testCaseNormalization()
Test case normalization of parameters.
public
testCaseNormalization() : void
Return values
void —testCreateIsDisallowed()
Test account creation is disallowed.
public
testCreateIsDisallowed() : void
Return values
void —testLoginWithBlankPassword()
Test login with blank password.
public
testLoginWithBlankPassword() : void
Return values
void —testLoginWithBlankUsername()
Test login with blank username.
public
testLoginWithBlankUsername() : void
Return values
void —testWithMissingBaseDN()
Verify that missing baseDN causes failure.
public
testWithMissingBaseDN() : void
Return values
void —testWithMissingHost()
Verify that missing host causes failure.
public
testWithMissingHost() : void
Return values
void —testWithMissingPort()
Verify that missing port causes failure.
public
testWithMissingPort() : void
Return values
void —testWithMissingUid()
Verify that missing UID causes failure.
public
testWithMissingUid() : 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 —getLoginRequest()
Support method -- get parameters to log into an account (but allow override of individual parameters so we can test different scenarios).
protected
getLoginRequest([array<string|int, mixed> $overrides = [] ]) : Request
Parameters
- $overrides : array<string|int, mixed> = []
-
Associative array of parameters to override.
Return values
Request —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