Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Listen to DatabaseRefreshed rather than MigrationsEnded in TestCase #2492

Merged
merged 1 commit into from Sep 1, 2023

Conversation

Okipa
Copy link
Contributor

@Okipa Okipa commented Sep 1, 2023

Listening to DatabaseRefreshed event rather than MigrationsEnded can avoid issues during testing after artisan schema:dump command has been executed.

In fact, MigrationsEnded is not called when the migration is based on a mysql-schema.sql file and has no migration executed anymore.

DatabaseRefreshed is always executed in both cases.

Listening to `DatabaseRefreshed` event rather than `MigrationsEnded` can avoid issues during testing after `artisan schema:dump` command has been executed.

In fact, `MigrationsEnded` is not called when the migration is based on a `mysql-schema.sql` file and has no migration executed anymore.

`DatabaseRefreshed` is always executed in both cases.
@drbyte
Copy link
Collaborator

drbyte commented Sep 1, 2023

Thanks!

@drbyte drbyte changed the title Listen to DatabaseRefreshed rather than MigrationsEnded in TestCase [Docs] Listen to DatabaseRefreshed rather than MigrationsEnded in TestCase Sep 1, 2023
@drbyte drbyte merged commit 465b9d7 into spatie:main Sep 1, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants