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
Table command tests will break #29521
Comments
Can you provide the |
Command Example:
Test Example:
|
I can indeed reproduce this. From what I can tell it's probably best to revert it but that'll break the new behavior again. |
This doesn't only affect table command tests, but other 'ordered' expected outputs as well. In our case it's a question that is being asked in a loop, so it can appear more than once in the output, but when the question is being expected for the second time, the test breaks. $this->artisan('create:admin')
->expectsQuestion('Please provide name for your admin.', 'first')
->expectsOutput("Admin with 'first' name successfully created. Admin ID: 1")
->expectsQuestion('Would you like to create another admin?', true)
->expectsQuestion('Please provide name for your admin.', 'second')
->expectsOutput("Admin with 'second' name successfully created. Admin ID: 2")
->expectsQuestion('Would you like to create another admin?', false)
->assertExitCode(0); So here the second 'Please provide name for your admin' will break the code due to mockery error: |
@driesvints works fine with my tests as it was working with v5.8.29 |
Mohamed's PR was merged and will be in the next minor release for Laravel. |
Description:
After the commit 42c19bd tests like these will break:
Steps To Reproduce:
Write a test for a command, which expects a table output:
The text was updated successfully, but these errors were encountered: