Answer the question
In order to leave comments, you need to log in
How to test inserts into a database?
There are tests that are loaded into the database - this is one type of test.
Accordingly, in the same class, you need to do some checks, for example, how many records have been added:
function testUpdate(){}
function testCountRows(){}
Answer the question
In order to leave comments, you need to log in
https://laravel.com/docs/5.8/database-testing
+ It can be said that it does not recreate after each test
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question