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

[11.x] Fix LazilyRefreshDatabase when using Laravel BrowserKit Testing #51538

Merged
merged 4 commits into from
May 22, 2024

Conversation

MaxGiting
Copy link
Contributor

@MaxGiting MaxGiting commented May 22, 2024

This PR #49914 introduced an issue where if you are using https://github.com/laravel/browser-kit-testing it will error when you run tests that use LazilyRefreshDatabase.

This is because PR 49914 added the use of the mockConsoleOutput property.
The InteractsWithConsole trait in Laravel has this property set.


But the InteractsWithConsole in BrowserKit Testing does not
https://github.com/laravel/browser-kit-testing/blob/7.x/src/Concerns/InteractsWithConsole.php

When running tests we get the following error.
ErrorException: Undefined property MyClassIntegrationTest::$mockConsoleOutput

I added the conditional check for the mockConsoleOutput property into the InteractsWithConsole trait here because the InteractsWithConsole in BrowserKit Testing has not been edited in 8 years so has diverged greatly from the Frameworks current InteractsWithConsole trait. So I thought it would make sense to add it here instead of the package.

MaxGiting and others added 3 commits May 22, 2024 21:37
Co-authored-by: AJ <60591772+devajmeireles@users.noreply.github.com>
Co-authored-by: AJ <60591772+devajmeireles@users.noreply.github.com>
@taylorotwell taylorotwell merged commit b7a95f7 into laravel:11.x May 22, 2024
27 of 28 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.

3 participants