Database
2 exercises work on this concept, by writing code in the browser.
In Practice
- See what you just wrote right away, despite the replica The PreventStaleDatabaseReads middleware sends a visitor's reads to the primary database right after they wrote, and DB::usingWritePdo() does it for a block of code.
- Counting the rows of several tables in one assertion assertDatabaseCount() accepts an array: the expected number of rows in each table, checked in a single assertion.