diff --git a/app/Letter/Actions/LetterSendAction.php b/app/Letter/Actions/LetterSendAction.php index aaf641b5..14cbd70c 100644 --- a/app/Letter/Actions/LetterSendAction.php +++ b/app/Letter/Actions/LetterSendAction.php @@ -31,7 +31,7 @@ class LetterSendAction /** * Execute the console command. */ - private function handle(): int + public function handle(): int { foreach (app(DocumentFactory::class)->types as $type) { $letters = app(DocumentFactory::class)->repoCollection($type, 'E-Mail'); diff --git a/tests/Feature/Letter/LetterSendActionTest.php b/tests/Feature/Letter/LetterSendActionTest.php index 1a0f67c1..c6f7c060 100644 --- a/tests/Feature/Letter/LetterSendActionTest.php +++ b/tests/Feature/Letter/LetterSendActionTest.php @@ -37,7 +37,7 @@ class LetterSendActionTest extends TestCase { Mail::fake(); - LetterSendAction::run(); + app(LetterSendAction::class)->handle(); Mail::assertSent(PaymentMail::class, fn ($mail) => Storage::path('rechnung-fur-mom.pdf') === $mail->filename); }