- Laravel Version: 6.x
- PHP Version: 7.3.14 (not relevant)
- Database Driver & Version: (not relevant)
Description:
With #31426 now any command that uses table() is breaking on tests, the reason is at testing we mock a BufferedOutput and not a ConsoleOutput, which has section() method:
https://github.com/laravel/framework/blob/6.x/src/Illuminate/Foundation/Testing/PendingCommand.php#L185-L207
I tried to mock ConsoleOutput instead but it's not that simple as the output stream at ConsoleOutput is done on private methods.
Steps To Reproduce:
Create a Command that uses table() and tests it asserting the exit code.
Description:
With #31426 now any command that uses
table()is breaking on tests, the reason is at testing we mock aBufferedOutputand not aConsoleOutput, which hassection()method:https://github.com/laravel/framework/blob/6.x/src/Illuminate/Foundation/Testing/PendingCommand.php#L185-L207
I tried to mock
ConsoleOutputinstead but it's not that simple as the output stream atConsoleOutputis done on private methods.Steps To Reproduce:
Create a Command that uses
table()and tests it asserting the exit code.