Skip to content

Commit 58cc210

Browse files
authored
Update MailServiceTest.php
Try to fix php-stan error for php 8.2 Signed-off-by: APaikens <shamanis@gmail.com>
1 parent a1bc25d commit 58cc210

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/Service/MailServiceTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ public function testAttachFilesNoNestedMixedParts(): void
306306
public function testMessageBodyIsResetAfterFailedSendToPreventAttachmentLeak(): void
307307
{
308308
$this->mailService->setSubject('First');
309+
$this->message->text('');
309310
$this->message->html('First body');
310311
$this->mailService->addAttachment(
311312
$this->fileSystem->url() . '/data/mail/attachments/testPdfAttachment.pdf'
@@ -338,6 +339,7 @@ public function testMessageBodyIsResetAfterFailedSendToPreventAttachmentLeak():
338339
public function testAttachmentsDoNotLeakIntoSubsequentSendAfterFailure(): void
339340
{
340341
$this->mailService->setSubject('First');
342+
$this->message->text('');
341343
$this->message->html('First email');
342344
$this->mailService->addAttachment(
343345
$this->fileSystem->url() . '/data/mail/attachments/testPdfAttachment.pdf'
@@ -365,6 +367,7 @@ public function testAttachmentsDoNotLeakIntoSubsequentSendAfterFailure(): void
365367
// Reconfigure: brand new email with NO attachments.
366368
$this->mailService->setAttachments([]);
367369
$this->mailService->setSubject('Second');
370+
$this->message->text('');
368371
$this->message->html('Second email - must not carry first email\'s attachment');
369372

370373
$this->mailService->send();
@@ -387,6 +390,7 @@ public function testAttachmentsDoNotLeakIntoSubsequentSendAfterFailure(): void
387390
public function testMessageBodyIsResetAfterSuccessfulSend(): void
388391
{
389392
$this->mailService->setSubject('Hello');
393+
$this->message->text('');
390394
$this->message->html('Body');
391395
$this->mailService->addAttachment(
392396
$this->fileSystem->url() . '/data/mail/attachments/testPdfAttachment.pdf'

0 commit comments

Comments
 (0)