Add LetterSendAction
This commit is contained in:
parent
2150139abf
commit
74c711d75c
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Letter\Actions\LetterSendAction;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
|
@ -13,6 +14,7 @@ class Kernel extends ConsoleKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
LetterSendAction::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,10 +16,8 @@ class LetterSendAction
|
|||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'payment:send';
|
||||
public string $commandSignature = 'letter:send';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
|
|
|
@ -8,6 +8,7 @@ use App\Member\Member;
|
|||
use App\Payment\Payment;
|
||||
use App\Payment\PaymentMail;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Mail;
|
||||
use Tests\TestCase;
|
||||
|
@ -37,7 +38,7 @@ class LetterSendActionTest extends TestCase
|
|||
{
|
||||
Mail::fake();
|
||||
|
||||
app(LetterSendAction::class)->handle();
|
||||
Artisan::call('letter:send');
|
||||
|
||||
Mail::assertSent(PaymentMail::class, fn ($mail) => Storage::path('rechnung-fur-mom.pdf') === $mail->filename);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue