Skip to content

[5.8] Fix command output/questions expectations - #29580

Merged
taylorotwell merged 3 commits into
laravel:5.8from
themsaid:testingTryCatch
Aug 15, 2019
Merged

[5.8] Fix command output/questions expectations#29580
taylorotwell merged 3 commits into
laravel:5.8from
themsaid:testingTryCatch

Conversation

@themsaid

Copy link
Copy Markdown
Member

As reported in #29521, when trying to test that a question was asked multiple times or output was printed multiple times, the out of order exception is thrown.

This PR brings back the use of once(). However, it handles the Mockery exception thrown so instead of people seeing:

Mockery\Exception\InvalidCountException: Method doWrite('hola mundo', <Any>) from Mockery_0_Symfony_Component_Console_Output_BufferedOutput should be called
 exactly 1 times but called 0 times.

People see:

Output "hola mundo" was not printed.

@themsaid
themsaid requested a review from driesvints August 15, 2019 09:05
@taylorotwell
taylorotwell merged commit 8714896 into laravel:5.8 Aug 15, 2019
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