File tree 1 file changed +20
-0
lines changed
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
16
16
- [ Lumen] ( #lumen )
17
17
- [ Non-Laravel projects] ( #non-laravel-projects )
18
18
- [ Testing] ( #testing )
19
+ - [ Database Testing] ( #database-testing )
19
20
- [ Configuration] ( #configuration )
20
21
- [ Eloquent] ( #eloquent )
21
22
- [ Extending the base model] ( #extending-the-base-model )
@@ -113,6 +114,25 @@ To run the test for this package, run:
113
114
docker-compose up
114
115
```
115
116
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
+
116
136
Configuration
117
137
-------------
118
138
You 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