From e2e59179d8cf5cd10fde972914d664df63bf020f Mon Sep 17 00:00:00 2001 From: Ditty Date: Fri, 31 Jan 2020 15:38:27 +0300 Subject: [PATCH 1/3] Add explanation for database migration resets Co-Authored-By: theminer3746 --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2ff886541..b92cee5d7 100644 --- a/README.md +++ b/README.md @@ -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) @@ -113,6 +114,21 @@ To run the test for this package, run: docker-compose up ``` +Database Testing +------- + +Resetting The Database After Each Test + +```php +use Illuminate\Foundation\Testing\DatabaseMigrations; +``` + +And inside each test classes. + +```php +use DatabaseMigrations; +``` + 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`: From 9f1b5819f0d56f6569249f4fccfc171094cdf313 Mon Sep 17 00:00:00 2001 From: Divine <48183131+divine@users.noreply.github.com> Date: Tue, 4 Feb 2020 19:05:07 +0300 Subject: [PATCH 2/3] Add explanation for not working classess --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b92cee5d7..3a189561f 100644 --- a/README.md +++ b/README.md @@ -117,18 +117,29 @@ docker-compose up Database Testing ------- -Resetting The Database After Each Test +To reset the database after each test, add: ```php use Illuminate\Foundation\Testing\DatabaseMigrations; ``` -And inside each test classes. +Also inside each test classes, add: ```php use DatabaseMigrations; ``` +Keep in mind that currently this isn't supported and should be removed: + +```php +use DatabaseTransactions; +``` +and + +```php +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`: From 0bbb40456ef3f8a9cdfe02eec7c05378f91c2353 Mon Sep 17 00:00:00 2001 From: Divine <48183131+divine@users.noreply.github.com> Date: Wed, 5 Feb 2020 02:40:27 +0300 Subject: [PATCH 3/3] update clarification for database migration --- README.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3a189561f..1f13ea261 100644 --- a/README.md +++ b/README.md @@ -129,16 +129,9 @@ Also inside each test classes, add: use DatabaseMigrations; ``` -Keep in mind that currently this isn't supported and should be removed: - -```php -use DatabaseTransactions; -``` -and - -```php -use RefreshDatabase; -``` +Keep in mind that these traits are not yet supported: +- `use Database Transactions;` +- `use RefreshDatabase;` Configuration -------------