Skip to content

Commit

Permalink
Merge pull request #1941 from divine/pr_1476
Browse files Browse the repository at this point in the history
[Updated PR#1476] Add explanation for database migration resets
  • Loading branch information
Smolevich committed Feb 5, 2020
2 parents c55d42d + 0bbb404 commit ef147ea
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -16,6 +16,7 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
- [Lumen](#lumen)
- [Non-Laravel projects](#non-laravel-projects)
- [Testing](#testing)
- [Database Testing](#database-testing)
- [Configuration](#configuration)
- [Eloquent](#eloquent)
- [Extending the base model](#extending-the-base-model)
Expand Down Expand Up @@ -113,6 +114,25 @@ To run the test for this package, run:
docker-compose up
```

Database Testing
-------

To reset the database after each test, add:

```php
use Illuminate\Foundation\Testing\DatabaseMigrations;
```

Also inside each test classes, add:

```php
use DatabaseMigrations;
```

Keep in mind that these traits are not yet supported:
- `use Database Transactions;`
- `use RefreshDatabase;`

Configuration
-------------
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`:
Expand Down

0 comments on commit ef147ea

Please sign in to comment.