trait
Illuminate
/
Foundation
/
Testing
/
RefreshDatabase
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
RefreshDatabase
Methods
public
refreshDatabase ( ) : void
Define hooks to migrate the database before and after each test.
protected
usingInMemoryDatabase ( ) : bool
Determine if an in-memory database is being used.
protected
restoreInMemoryDatabase ( ) : void
Restore the in-memory database between tests.
protected
refreshTestDatabase ( ) : void
Refresh a conventional test database.
public
beginDatabaseTransaction ( ) : void
Begin a database transaction on the testing database.
protected
connectionsToTransact ( ) : array
The database connections that should have transactions.
protected
beforeRefreshingDatabase ( ) : void
Perform any work that should take place before the database has started refreshing.
protected
afterRefreshingDatabase ( ) : void
Perform any work that should take place once the database has finished refreshing.