VuFind API Documentation

DatabaseUnitTest extends TestCase
in package

Database authentication test class.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Page

Table of Contents

getTestCreateWithPasswordPolicyData()  : array<string|int, mixed>
Data provider for testCreateWithPasswordPolicy
getTestCreateWithUsernamePolicyData()  : array<string|int, mixed>
Data provider for testCreateWithUsernamePolicy
testCreateDuplicateEmail()  : void
Test creation w/duplicate email.
testCreateDuplicateUsername()  : void
Test creation w/duplicate username.
testCreateWithBadPasswordPolicyPattern()  : void
Test validation of create request with a password policy.
testCreateWithMissingTableManager()  : void
Test missing table manager.
testCreateWithPasswordPolicy()  : void
Test validation of create request with a password policy.
testCreateWithUsernamePolicy()  : void
Test validation of create request with a username policy.
testEmptyCreateRequest()  : void
Test validation of empty create request.
testEmptyPasswordCreateRequest()  : void
Test validation of create request w/blank password.
testMismatchedPasswordCreateRequest()  : void
Test validation of create request w/mismatched passwords.
testSuccessfulCreation()  : void
Test successful creation.
getCreateParams()  : array<string|int, mixed>
Get fake create account parameters.
getDatabase()  : Database
Get a handler w/ fake table manager.
getRequest()  : MockObject|Request
Get a fake HTTP request.

Methods

getTestCreateWithPasswordPolicyData()

Data provider for testCreateWithPasswordPolicy

public static getTestCreateWithPasswordPolicyData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTestCreateWithUsernamePolicyData()

Data provider for testCreateWithUsernamePolicy

public static getTestCreateWithUsernamePolicyData() : array<string|int, mixed>
Return values
array<string|int, mixed>

testCreateDuplicateEmail()

Test creation w/duplicate email.

public testCreateDuplicateEmail() : void
Return values
void

testCreateDuplicateUsername()

Test creation w/duplicate username.

public testCreateDuplicateUsername() : void
Return values
void

testCreateWithBadPasswordPolicyPattern()

Test validation of create request with a password policy.

public testCreateWithBadPasswordPolicyPattern() : void
Return values
void

testCreateWithMissingTableManager()

Test missing table manager.

public testCreateWithMissingTableManager() : void
Return values
void

testCreateWithPasswordPolicy()

Test validation of create request with a password policy.

public testCreateWithPasswordPolicy(array<string|int, mixed> $authConfig, string $password, string $expectedExceptionClass, string $expectedExceptionMsg) : void
Parameters
$authConfig : array<string|int, mixed>

Authentication configuration

$password : string

Password for test

$expectedExceptionClass : string

Expected exception class

$expectedExceptionMsg : string

Expected exception message

Tags
dataProvider

getTestCreateWithPasswordPolicyData

Return values
void

testCreateWithUsernamePolicy()

Test validation of create request with a username policy.

public testCreateWithUsernamePolicy(array<string|int, mixed> $authConfig, string $username, string $expectedExceptionClass, string $expectedExceptionMsg) : void
Parameters
$authConfig : array<string|int, mixed>

Authentication configuration

$username : string

Username for test

$expectedExceptionClass : string

Expected exception class

$expectedExceptionMsg : string

Expected exception message

Tags
dataProvider

getTestCreateWithUsernamePolicyData

Return values
void

testEmptyCreateRequest()

Test validation of empty create request.

public testEmptyCreateRequest() : void
Return values
void

testEmptyPasswordCreateRequest()

Test validation of create request w/blank password.

public testEmptyPasswordCreateRequest() : void
Return values
void

testMismatchedPasswordCreateRequest()

Test validation of create request w/mismatched passwords.

public testMismatchedPasswordCreateRequest() : void
Return values
void

testSuccessfulCreation()

Test successful creation.

public testSuccessfulCreation() : void
Return values
void

getCreateParams()

Get fake create account parameters.

protected getCreateParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRequest()

Get a fake HTTP request.

protected getRequest([array<string|int, mixed> $post = [] ]) : MockObject|Request
Parameters
$post : array<string|int, mixed> = []

POST parameters

Return values
MockObject|Request

Search results