feat: send mailings over MailJet smtp in dedicated worker process

This commit is contained in:
Björn Fromme
2026-08-12 15:47:04 +02:00
parent a5c98025d0
commit e0a9562fc6
14 changed files with 480 additions and 44 deletions
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace App\Tests\MessageHandler;
use App\Message\SendTeamerMailing;
use App\MessageHandler\SendTeamerMailingHandler;
use App\Service\Teamer\TeamerMailingService;
use PHPUnit\Framework\TestCase;
class SendTeamerMailingHandlerTest extends TestCase
{
public function testTheMailingIsHandedToTheServiceUnchanged(): void
{
$mailing = new SendTeamerMailing('Betreff', 'Nachricht', [
['email' => '[email protected]', 'firstName' => 'Anna', 'lastName' => 'Berg', 'fullName' => 'Anna Berg'],
]);
$service = $this->createMock(TeamerMailingService::class);
$service
->expects($this->once())
->method('sendMailing')
->with($this->identicalTo($mailing))
;
(new SendTeamerMailingHandler($service))($mailing);
}
}