Files
netslim-core/tests/Notifications/NotificationDispatchTest.php
2026-03-20 22:13:41 +01:00

30 lines
855 B
PHP

<?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,
]);
}
}