A common debate in the community is whether you should use SQLite or the same database that you use in production for your tests; assuming you don't use SQLite in production. By using SQLite, the fear is that you could unknowingly introduce a bug due to differences in the database engines/drivers.

In any case, I've found that using an in-memory SQLite database for my tests has offered me the greatest performance.

SQLite doesn't support that function I want to use, so I'll have to use the real database driver for my tests...

8DB::statement("SELECT concat(column1, column2) FROM table"); 9DB::statement("SELECT concat('foo', ' ', 'bar') FROM table"); regexp 1use Illuminate\Support\Facades\DB; 2
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners