You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dusk.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,24 @@ To specify the database connections that should have their tables truncated, you
222
222
*/
223
223
protected $connectionsToTruncate = ['mysql'];
224
224
225
+
If you would like to execute code before or after database truncation is performed, you may define `beforeTruncatingDatabase` or `afterTruncatingDatabase` methods on your test class:
226
+
227
+
/**
228
+
* Perform any work that should take place before the database has started truncating.
229
+
*/
230
+
protected function beforeTruncatingDatabase(): void
231
+
{
232
+
//
233
+
}
234
+
235
+
/**
236
+
* Perform any work that should take place after the database has finished truncating.
237
+
*/
238
+
protected function afterTruncatingDatabase(): void
0 commit comments