Files
alrahma_sunday_school_api/tests/Unit/Services/Email/EmailProfileServiceTest.php
T
2026-06-09 02:32:58 -04:00

34 lines
1017 B
PHP

<?php
namespace Tests\Unit\Services\Email;
use App\Services\Email\EmailProfileService;
use Tests\TestCase;
class EmailProfileServiceTest extends TestCase
{
public function test_resolve_profile_maps_aliases(): void
{
$service = new EmailProfileService();
$this->assertSame('communication', $service->resolveProfile('comm'));
$this->assertSame('default', $service->resolveProfile('system'));
$this->assertSame('payment', $service->resolveProfile('payment'));
}
public function test_env_key_from_profile(): void
{
$service = new EmailProfileService();
$this->assertSame('PAYMENT_ALERTS', $service->envKeyFromProfile('payment alerts'));
}
public function test_sanitize_reply_to_name(): void
{
$service = new EmailProfileService();
$this->assertSame('Fallback', $service->sanitizeReplyToName('no-reply', 'Fallback'));
$this->assertSame('Support', $service->sanitizeReplyToName('Support', 'Fallback'));
}
}