From ce33a523dc528010a3461f8b85c8d774e05f99b5 Mon Sep 17 00:00:00 2001 From: pushrbx Date: Thu, 30 Mar 2023 00:22:50 +0100 Subject: [PATCH] updated test docs --- tests/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/readme.md b/tests/readme.md index ae98806..b4bee99 100644 --- a/tests/readme.md +++ b/tests/readme.md @@ -4,6 +4,9 @@ When developing run all the tests once with `phpunit` if you are just getting st This will setup the test database for you in mongodb, as there is a test listener class which runs the migrations for a new database named `jikan-test`. (by default, feel free to override it if required) +> Please note that the test database should not be the same as the development database you have already indexed data into, as +> the tests will drop all collections in mongodb at the end of the test run. + When writing tests you should not use `DatabaseMigration` and `DatabaseTransaction` traits. - If the search index requires resetting between tests, use `ScoutFlush` trait. - If the database contents requires resetting between tests, use `SyntheticMongoDbTransaction` trait.