Files
animethemes-server/tests/Unit/Notifications/DiscordNotificationTest.php
T
2025-07-29 23:31:12 -03:00

25 lines
715 B
PHP

<?php
declare(strict_types=1);
use App\Notifications\DiscordNotification;
use Illuminate\Notifications\AnonymousNotifiable;
use NotificationChannels\Discord\DiscordChannel;
use NotificationChannels\Discord\DiscordMessage;
test('via discord message', function () {
$message = DiscordMessage::create();
$notification = new DiscordNotification($message);
$this->assertEquals([DiscordChannel::class], $notification->via(new AnonymousNotifiable()));
});
test('to discord message', function () {
$message = DiscordMessage::create();
$notification = new DiscordNotification($message);
$this->assertInstanceOf(DiscordMessage::class, $notification->toDiscord(new AnonymousNotifiable()));
});