trait LazilyRefreshDatabase (View source)
| RefreshDatabase | |
| CanConfigureMigrationCommands |
| array | migrateFreshUsing()
The parameters that should be used when running "migrate:fresh". | from CanConfigureMigrationCommands |
| bool | shouldDropViews()
Determine if views should be dropped when refreshing the database. | from CanConfigureMigrationCommands |
| bool | shouldDropTypes()
Determine if types should be dropped when refreshing the database. | from CanConfigureMigrationCommands |
| bool | shouldSeed()
Determine if the seed task should be run when refreshing the database. | from CanConfigureMigrationCommands |
| mixed | seeder()
Determine the specific seeder class that should be used when refreshing the database. | from CanConfigureMigrationCommands |
| void | refreshDatabase()
Define hooks to migrate the database before and after each test. | |
| bool | usingInMemoryDatabase()
Determine if an in-memory database is being used. | from RefreshDatabase |
| void | restoreInMemoryDatabase()
Restore the in-memory database between tests. | from RefreshDatabase |
| void | refreshTestDatabase()
Refresh a conventional test database. | from RefreshDatabase |
| void | beginDatabaseTransaction()
Begin a database transaction on the testing database. | from RefreshDatabase |
| array | connectionsToTransact()
The database connections that should have transactions. | from RefreshDatabase |
| void | beforeRefreshingDatabase()
Perform any work that should take place before the database has started refreshing. | from RefreshDatabase |
| void | afterRefreshingDatabase()
Perform any work that should take place once the database has finished refreshing. | from RefreshDatabase |
The parameters that should be used when running "migrate:fresh".
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.
Determine the specific seeder class that should be used when refreshing the database.
Define hooks to migrate the database before and after each test.
Determine if an in-memory database is being used.
Restore the in-memory database between tests.
Refresh a conventional test database.
Begin a database transaction on the testing database.
The database connections that should have transactions.
Perform any work that should take place before the database has started refreshing.
Perform any work that should take place once the database has finished refreshing.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Foundation/Testing/LazilyRefreshDatabase.html