File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
1616 - [ Lumen] ( #lumen )
1717 - [ Non-Laravel projects] ( #non-laravel-projects )
1818 - [ Testing] ( #testing )
19+ - [ Database Testing] ( #database-testing )
1920 - [ Configuration] ( #configuration )
2021 - [ Eloquent] ( #eloquent )
2122 - [ Extending the base model] ( #extending-the-base-model )
@@ -113,6 +114,25 @@ To run the test for this package, run:
113114docker-compose up
114115```
115116
117+ Database Testing
118+ -------
119+
120+ To reset the database after each test, add:
121+
122+ ``` php
123+ use Illuminate\Foundation\Testing\DatabaseMigrations;
124+ ```
125+
126+ Also inside each test classes, add:
127+
128+ ``` php
129+ use DatabaseMigrations;
130+ ```
131+
132+ Keep in mind that these traits are not yet supported:
133+ - ` use Database Transactions; `
134+ - ` use RefreshDatabase; `
135+
116136Configuration
117137-------------
118138You can use MongoDB either as the main database, either as a side database. To do so, add a new ` mongodb ` connection to ` config/database.php ` :
You can’t perform that action at this time.
0 commit comments