add notifications logic and add support of both JWT and Sanctum
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Services\Notifications;
|
||||
|
||||
use App\Services\Notifications\NotificationDispatchService;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Tests\TestCase;
|
||||
|
||||
class NotificationDispatchServiceTest extends TestCase
|
||||
{
|
||||
public function test_dispatch_logs_email_and_sms(): void
|
||||
{
|
||||
Log::spy();
|
||||
|
||||
$service = new NotificationDispatchService();
|
||||
$service->sendEmail('parent@example.com', 'Subject', 'Message');
|
||||
$service->sendSms('5551112222', 'Message');
|
||||
|
||||
Log::shouldHaveReceived('info')->twice();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user