RegistrationTest extends TestCase Uses TestDatabase, RefreshDatabase
RegistrationTest Class Tests the Registration class.
Table of Contents
$fakeUserData | array | |
---|---|---|
$migrated | bool | |
tearDown() | void | |
setUp() | Setup the database schema. | void |
testValidation() | Test validation works | mixed |
testMissingFields() | Test the $requiredProperties property | mixed |
testNormalRegistration() | mixed | |
testValidationWithDuplicateUsername() | mixed | |
testValidationWithDuplicateEmail() | mixed | |
setupTestDatabase() | Define the test_integration database connection the default one | mixed |
refreshDatabase() | Define hooks to migrate the database before and after each test. | mixed |
usingInMemoryDatabase() | Determine if an in-memory database is being used. | bool |
refreshInMemoryDatabase() | Refresh the in-memory database. | mixed |
refreshTestDatabase() | Refresh a conventional test database. | mixed |
beginDatabaseTransaction() | Handle database transactions on the specified connections. | mixed |
connectionsToTransact() | The database connections that should have transactions. | array |
Properties
$fakeUserData
protected
array
$fakeUserData
= ['user_name' => 'FooBar', 'first_name' => 'Foo', 'last_name' => 'Bar', 'email' => '[email protected]', 'password' => 'FooBarFooBar123']
$migrated
public
static bool
$migrated
= false
Methods
tearDown()
public
tearDown(
)
: void
setUp()
Setup the database schema.
public
setUp(
)
: void
testValidation()
Test validation works
public
testValidation(
)
: mixed
Return values
mixedtestMissingFields()
Test the $requiredProperties property
public
testMissingFields(
)
: mixed
Tags
Return values
mixedtestNormalRegistration()
public
testNormalRegistration(
)
: mixed
Tags
Return values
mixedtestValidationWithDuplicateUsername()
public
testValidationWithDuplicateUsername(
)
: mixed
Tags
Return values
mixedtestValidationWithDuplicateEmail()
public
testValidationWithDuplicateEmail(
)
: mixed
Tags
Return values
mixedsetupTestDatabase()
Define the test_integration database connection the default one
public
setupTestDatabase(
)
: mixed
Return values
mixedrefreshDatabase()
Define hooks to migrate the database before and after each test.
public
refreshDatabase(
)
: mixed
Return values
mixedusingInMemoryDatabase()
Determine if an in-memory database is being used.
public
usingInMemoryDatabase(
)
: bool
Return values
boolrefreshInMemoryDatabase()
Refresh the in-memory database.
protected
refreshInMemoryDatabase(
)
: mixed
Return values
mixedrefreshTestDatabase()
Refresh a conventional test database.
protected
refreshTestDatabase(
)
: mixed
Return values
mixedbeginDatabaseTransaction()
Handle database transactions on the specified connections.
protected
beginDatabaseTransaction(
)
: mixed
Return values
mixedconnectionsToTransact()
The database connections that should have transactions.
protected
connectionsToTransact(
)
: array