Transactions per test are faster than truncation

Resetting the database between tests by truncating every table costs a statement per table per test, which on forty tables and four hundred tests is sixteen thousand statements.

use IlluminateFoundationTestingRefreshDatabase;

class OrderTest extends TestCase
{
    use RefreshDatabase;   // wraps each test in a transaction, rolls back
}

// where it breaks down:
//   code under test that commits explicitly
//   anything testing transaction behaviour itself
//   a second connection — a queue worker, a raw PDO handle

The second connection case is the one that produces a genuinely confusing failure: the data exists inside the transaction and is invisible to anything connecting separately, so a test that spawns a process sees an empty database. Those tests need the truncating variant and are worth isolating into their own suite. On one project this took the suite from four minutes to fifty seconds, which is the difference between running it before every commit and not.