first commit
This commit is contained in:
29
tests/Notifications/NotificationDispatchTest.php
Normal file
29
tests/Notifications/NotificationDispatchTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Notifications;
|
||||
|
||||
use Netig\Netslim\Notifications\Domain\Entity\NotificationDispatch;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class NotificationDispatchTest extends TestCase
|
||||
{
|
||||
public function testRejectsUnsupportedStatus(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Statut de notification non supporté');
|
||||
|
||||
NotificationDispatch::fromRow([
|
||||
'id' => 1,
|
||||
'recipient' => 'user@example.test',
|
||||
'subject' => 'Sujet',
|
||||
'template' => '@Identity/emails/password-reset.twig',
|
||||
'status' => 'queued',
|
||||
'notification_key' => null,
|
||||
'error_message' => null,
|
||||
'created_at' => '2026-03-20 10:00:00',
|
||||
'sent_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user