add family logic

This commit is contained in:
root
2026-03-10 17:52:47 -04:00
parent a82f7aedbc
commit 17d73e2f92
37 changed files with 2611 additions and 2 deletions
@@ -0,0 +1,34 @@
<?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);
}
}