You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It wiuld be nice to have an easy way to test commands that require user interaction, for example, as it is done with Laravel commands.
/** * Test a console command. */publicfunctiontest_console_command(): void
{
$this->artisan('question')
->expectsQuestion('What is your name?', 'Taylor Otwell')
->expectsQuestion('Which language do you prefer?', 'PHP')
->expectsOutput('Your name is Taylor Otwell and you prefer PHP.')
->doesntExpectOutput('Your name is Taylor Otwell and you prefer Ruby.')
->assertExitCode(0);
}
It wiuld be nice to have an easy way to test commands that require user interaction, for example, as it is done with Laravel commands.
https://laravel.com/docs/11.x/console-tests#input-output-expectations
The text was updated successfully, but these errors were encountered: