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

[5.7] Fix withoutMockingConsoleOutput #25499

Merged
merged 2 commits into from
Sep 7, 2018
Merged

[5.7] Fix withoutMockingConsoleOutput #25499

merged 2 commits into from
Sep 7, 2018

Conversation

SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Sep 7, 2018

Yesterday #25454 was merged, but it was changed so that it mocks console output by default. You can call withoutMockingConsoleOutput() if you don't want to mock console output.

The problem with this is that PendingCommand binds the mocked OutputStyle in the container. This means that running any artisan command (like the RefreshDatabase trait does) will permanently mock the console output, causing withoutMockingConsoleOutput() to not work.

This PR unbinds the mocked OutputStyle from the container when calling withoutMockingConsoleOutput()

Also, since the others parts of the framework (such as notifications or the queue) have to be explicitly mocked, is it a better idea to not mock console output by default?

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.

2 participants