mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
updated test docs
This commit is contained in:
parent
91c0421ee2
commit
ce33a523dc
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user