Files
2026-03-10 17:52:47 -04:00

35 lines
876 B
PHP

<?php
namespace Tests\Unit\Services\Families;
use App\Services\Email\EmailDispatchService;
use App\Services\Families\FamilyNotificationService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class FamilyNotificationServiceTest extends TestCase
{
use RefreshDatabase;
public function test_send_compose_email_delegates_to_dispatcher(): void
{
$this->mock(EmailDispatchService::class, function ($mock) {
$mock->shouldReceive('send')
->once()
->andReturn(true);
});
$service = $this->app->make(FamilyNotificationService::class);
$result = $service->sendComposeEmail(
'recipient@example.com',
'Subject',
'<p>Body</p>',
null,
null,
null
);
$this->assertTrue($result);
}
}