trait InteractsWithMigrations

internal  
 

Properties

protected MigrateProcessor> $cachedTestMigratorProcessors

List of cached migrators instances.

Methods

void
setUpInteractsWithMigrations()

Setup the test environment.

void
tearDownInteractsWithMigrations()

Teardown the test environment.

void
loadMigrationsFrom(array|string $paths)

Define hooks to migrate the database before and after each test.

bool
shouldRegisterMigrationPaths()

Determine whether migration paths should be registered for an upcoming migration.

array
resolvePackageMigrationsOptions(array|string $paths = [])

Resolve Package Migrations Artisan command options.

void
loadHypervelMigrations(array|string $database = [])

Migrate Hypervel's default migrations.

void
runHypervelMigrations(array|string $database = [])

Migrate all Hypervel migrations.

array
resolveHypervelMigrationsOptions(array|string $database = [])

Resolve Hypervel Migrations Artisan command options.

void
runMigrationProcessor(Application $app, array $options)

Run and retain a migration processor for teardown.

bool
usesInMemoryDatabaseForMigrationState()

Determine whether the active database concerns retain in-memory state.

void
resetApplicationArtisanCommands(Application $app)

Reset artisan commands for the application.

Details

at line 39
protected void setUpInteractsWithMigrations()

Setup the test environment.

Return Value

void

at line 51
protected void tearDownInteractsWithMigrations()

Teardown the test environment.

Return Value

void

at line 95
protected void loadMigrationsFrom(array|string $paths)

Define hooks to migrate the database before and after each test.

Parameters

array|string $paths

Return Value

void

at line 116
protected bool shouldRegisterMigrationPaths()

Determine whether migration paths should be registered for an upcoming migration.

Return Value

bool

at line 152
protected array resolvePackageMigrationsOptions(array|string $paths = [])

internal  
 

Resolve Package Migrations Artisan command options.

Parameters

array|string $paths

Return Value

array

Exceptions

InvalidArgumentException

at line 172
protected void loadHypervelMigrations(array|string $database = [])

Migrate Hypervel's default migrations.

Parameters

array|string $database

Return Value

void

at line 191
protected void runHypervelMigrations(array|string $database = [])

Migrate all Hypervel migrations.

Parameters

array|string $database

Return Value

void

at line 207
protected array resolveHypervelMigrationsOptions(array|string $database = [])

internal  
 

Resolve Hypervel Migrations Artisan command options.

Parameters

array|string $database

Return Value

array

at line 217
protected void runMigrationProcessor(Application $app, array $options)

Run and retain a migration processor for teardown.

Parameters

Application $app
array $options

Return Value

void

at line 245
protected bool usesInMemoryDatabaseForMigrationState()

Determine whether the active database concerns retain in-memory state.

Return Value

bool

at line 267
protected void resetApplicationArtisanCommands(Application $app)

internal  
 

Reset artisan commands for the application.

Parameters

Application $app

Return Value

void