SetWordWrapTest: use `preSend()` not `send()`
For this test, there is no need to actually try to _send_ the message, we just need to make sure that `setWordWrap()` is triggered, which can be done by calling `preSend()` instead of `send()`.
This commit is contained in:
parent
b4ab241395
commit
c6ed8ad0eb
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
namespace PHPMailer\Test\PHPMailer;
|
||||
|
||||
use PHPMailer\Test\SendTestCase;
|
||||
use PHPMailer\Test\PreSendTestCase;
|
||||
|
||||
/**
|
||||
* Test automatic wordwrap functionality.
|
||||
*/
|
||||
final class SetWordWrapTest extends SendTestCase
|
||||
final class SetWordWrapTest extends PreSendTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +40,7 @@ final class SetWordWrapTest extends SendTestCase
|
|||
$this->Mail->Subject .= ': Wordwrap';
|
||||
|
||||
$this->buildBody();
|
||||
self::assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
self::assertTrue($this->Mail->preSend(), $this->Mail->ErrorInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -62,6 +62,6 @@ final class SetWordWrapTest extends SendTestCase
|
|||
$this->Mail->Subject .= ': Wordwrap multibyte';
|
||||
|
||||
$this->buildBody();
|
||||
self::assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
self::assertTrue($this->Mail->preSend(), $this->Mail->ErrorInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue