fix tests
This commit is contained in:
@@ -9,7 +9,7 @@ class BroadcastEmailComposerServiceTest extends TestCase
|
||||
{
|
||||
public function test_sanitize_removes_script_and_events(): void
|
||||
{
|
||||
$service = new BroadcastEmailComposerService();
|
||||
$service = new BroadcastEmailComposerService;
|
||||
$html = '<p onclick="alert(1)">Hi</p><script>alert(2)</script>';
|
||||
|
||||
$clean = $service->sanitizeHtml($html);
|
||||
@@ -20,7 +20,7 @@ class BroadcastEmailComposerServiceTest extends TestCase
|
||||
|
||||
public function test_compose_replaces_name_when_personalized(): void
|
||||
{
|
||||
$service = new BroadcastEmailComposerService();
|
||||
$service = new BroadcastEmailComposerService;
|
||||
$html = '<p>Hello {{name}}</p>';
|
||||
|
||||
$rendered = $service->compose(false, 'Subject', $html, 'Parent', '', '', '', true);
|
||||
|
||||
@@ -15,7 +15,7 @@ class BroadcastEmailRecipientServiceTest extends TestCase
|
||||
{
|
||||
$this->seedParentData();
|
||||
|
||||
$service = new BroadcastEmailRecipientService();
|
||||
$service = new BroadcastEmailRecipientService;
|
||||
$parents = $service->parentsWithEmails();
|
||||
|
||||
$this->assertCount(1, $parents);
|
||||
@@ -26,7 +26,7 @@ class BroadcastEmailRecipientServiceTest extends TestCase
|
||||
{
|
||||
$this->seedParentData();
|
||||
|
||||
$service = new BroadcastEmailRecipientService();
|
||||
$service = new BroadcastEmailRecipientService;
|
||||
$recipients = $service->recipientsByIds([10]);
|
||||
|
||||
$this->assertCount(1, $recipients);
|
||||
|
||||
@@ -12,12 +12,12 @@ class BroadcastEmailSenderOptionsServiceTest extends TestCase
|
||||
$old = getenv('MAIL_SENDERS') ?: '';
|
||||
putenv('MAIL_SENDERS={"general":{"name":"Office","email":"office@example.com"}}');
|
||||
|
||||
$service = new BroadcastEmailSenderOptionsService();
|
||||
$service = new BroadcastEmailSenderOptionsService;
|
||||
$options = $service->listOptions();
|
||||
|
||||
$this->assertSame('general', $options[0]['key']);
|
||||
$this->assertSame('Office <office@example.com>', $options[0]['label']);
|
||||
|
||||
putenv('MAIL_SENDERS=' . $old);
|
||||
putenv('MAIL_SENDERS='.$old);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user