trait RefreshDatabase (View source)
void | refreshDatabase() Define hooks to migrate the database before and after each test. | |
bool | usingInMemoryDatabase() Determine if an in-memory database is being used. | |
void | refreshInMemoryDatabase() Refresh the in-memory database. | |
array | migrateUsing() The parameters that should be used when running "migrate". | |
void | refreshTestDatabase() Refresh a conventional test database. | |
array | migrateFreshUsing() The parameters that should be used when running "migrate:fresh". | |
void | beginDatabaseTransaction() Begin a database transaction on the testing database. | |
array | connectionsToTransact() The database connections that should have transactions. | |
bool | shouldDropViews() Determine if views should be dropped when refreshing the database. | |
bool | shouldDropTypes() Determine if types should be dropped when refreshing the database. | |
bool | shouldSeed() Determine if the seed task should be run when refreshing the database. |
Define hooks to migrate the database before and after each test.
Determine if an in-memory database is being used.
Refresh the in-memory database.
The parameters that should be used when running "migrate".
Refresh a conventional test database.
The parameters that should be used when running "migrate:fresh".
Begin a database transaction on the testing database.
The database connections that should have transactions.
Determine if views should be dropped when refreshing the database.
Determine if types should be dropped when refreshing the database.
Determine if the seed task should be run when refreshing the database.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Foundation/Testing/RefreshDatabase.html