Skip to content

Commit

Permalink
Reset to SMTP mailer for line break tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Sep 12, 2017
1 parent 819f540 commit 28a306b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/phpmailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,7 @@ public function testLineBreaks()
{
//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";
Expand Down Expand Up @@ -1974,6 +1975,7 @@ public function testLineLength()
{
//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)');
Expand Down

0 comments on commit 28a306b

Please sign in to comment.