feat: send mailings over MailJet smtp in dedicated worker process
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user