Skip to content

Commit e2e5917

Browse files
divinetheminer3746
andcommitted
Add explanation for database migration resets
Co-Authored-By: theminer3746 <[email protected]>
1 parent c55d42d commit e2e5917

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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,21 @@ To run the test for this package, run:
113114
docker-compose up
114115
```
115116

117+
Database Testing
118+
-------
119+
120+
Resetting The Database After Each Test
121+
122+
```php
123+
use Illuminate\Foundation\Testing\DatabaseMigrations;
124+
```
125+
126+
And inside each test classes.
127+
128+
```php
129+
use DatabaseMigrations;
130+
```
131+
116132
Configuration
117133
-------------
118134
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`:

0 commit comments

Comments
 (0)