From c30e1ebe0a11c5e6f1fadc30199143c7c7a1ced3 Mon Sep 17 00:00:00 2001 From: yaozm Date: Sun, 7 Jan 2024 00:55:13 +0800 Subject: [PATCH] test(Feature): add test for outputting console - Add test for outputting console in OutputTest.php - Use `artisan('outputs')` to run the command - Assert that the command exits with a success code - Expect the output to contain OutputManager class - Group the test with the test file location --- tests/Feature/OutputTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Feature/OutputTest.php b/tests/Feature/OutputTest.php index 7761ac9..f87297b 100644 --- a/tests/Feature/OutputTest.php +++ b/tests/Feature/OutputTest.php @@ -28,6 +28,19 @@ ]; }); +it('can not output soar scores', function (): void { + config()->set('soar.exclusions', ['outputs']); + + $this->artisan('outputs') + ->assertExitCode(Command::SUCCESS) + ->expectsOutput(OutputManager::class); + + // $this->get('outputs') + // ->assertOk() + // // ->assertSee($this->see) + // ->assertSee(OutputManager::class); +})->group(__DIR__, __FILE__); + it('can outputs console', function (): void { $this->artisan('outputs') ->assertExitCode(Command::SUCCESS)