AddStringAttachmentTest: switch to preSend()

The actual "attaching" of the string attachment happens within `createBody()` which is called from `preSend()`, so this test doesn't actually need to call `send()`.
This commit is contained in:
jrfnl 2021-07-04 19:51:10 +02:00
parent 0bc3dfb96b
commit 41af61ab2f
1 changed files with 3 additions and 3 deletions

View File

@ -15,12 +15,12 @@ namespace PHPMailer\Test\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\Test\SendTestCase;
use PHPMailer\Test\PreSendTestCase;
/**
* Test adding string attachments functionality.
*/
final class AddStringAttachmentTest extends SendTestCase
final class AddStringAttachmentTest extends PreSendTestCase
{
/**
@ -38,7 +38,7 @@ final class AddStringAttachmentTest extends SendTestCase
$this->Mail->addStringAttachment($sAttachment, 'string_attach.txt');
$this->buildBody();
self::assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
self::assertTrue($this->Mail->preSend(), $this->Mail->ErrorInfo);
}
/**