Skip to content

Commit fc23c85

Browse files
Document usage of $tablesToTruncate when using DatabaseTruncation (#8533)
* Update dusk.md * Update dusk.md * Update dusk.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent aeade60 commit fc23c85

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dusk.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,16 @@ The `DatabaseTruncation` trait will migrate your database on the first test in o
194194
use DatabaseTruncation;
195195
}
196196

197-
By default, this trait will not truncate the `migrations` table. If you would like to further customize the tables that are excluded from truncation, you may define an `$exceptTables` property on your test class:
197+
By default, this trait will truncate all tables except the `migrations` table. If you would like to customize the tables that should be truncated, you may define a `$tablesToTruncate` property on your test class:
198+
199+
/**
200+
* Indicates which tables should be truncated.
201+
*
202+
* @var array
203+
*/
204+
protected $tablesToTruncate = ['users'];
205+
206+
Alternatively, you may define an `$exceptTables` property on your test class to specify which tables should be excluded from truncation:
198207

199208
/**
200209
* Indicates which tables should be excluded from truncation.

0 commit comments

Comments
 (0)