Ответ 1
Пример теста
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class YourCommandTest extends TestCase
{
use DatabaseTransactions;
public function testExample()
{
Artisan::call('your_command', [
'command_parameter_1' => 'value1',
'command_parameter_2' => 'value2',
]);
// If you need result of console output
$resultAsText = Artisan::output();
$this->assertTrue(true);
}
}