Reset to SMTP mailer for line break tests

This commit is contained in:
Marcus Bointon 2017-09-12 09:49:15 +02:00
parent 819f540c77
commit 28a306bfbd
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 2 additions and 0 deletions

View File

@ -1938,6 +1938,7 @@ EOT;
{
//May have been altered by earlier tests, can interfere with line break format
$this->Mail->isSMTP();
$this->Mail->preSend();
$unixsrc = "hello\nWorld\nAgain\n";
$macsrc = "hello\rWorld\rAgain\r";
$windowssrc = "hello\r\nWorld\r\nAgain\r\n";
@ -1974,6 +1975,7 @@ EOT;
{
//May have been altered by earlier tests, can interfere with line break format
$this->Mail->isSMTP();
$this->Mail->preSend();
$oklen = str_repeat(str_repeat('0', PHPMailer::MAX_LINE_LENGTH) . "\r\n", 2);
$badlen = str_repeat(str_repeat('1', PHPMailer::MAX_LINE_LENGTH + 1) . "\r\n", 2);
$this->assertTrue(PHPMailer::hasLineLongerThanMax($badlen), 'Long line not detected (only)');