3
A good practice in TDD is to keep the database clean between tests. For this, Laravel uses the Trait RefreshDatabase. However, this still doesn’t work for the Mongodb database.
My idea is to delete all Collections in the method tearDown of my test class.
How to Delete All Stories?
I use the implementation https://github.com/jenssegers/laravel-mongodb