Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Actually changes the test to test a different thing, still need to deal with what it was originally testing.
  • Loading branch information
Synchro committed May 21, 2016
1 parent 59663fd commit c27c159
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/phpmailerTest.php
Expand Up @@ -1311,20 +1311,22 @@ public function testEmptyBody()
}

/**
* Test constructing a message that contains lines that are too long for RFC compliance.
* Test constructing a multipart message that contains lines that are too long for RFC compliance.
*/
public function testLongBody()
{
$oklen = str_repeat(str_repeat('0', PHPMailer::MAX_LINE_LENGTH) . PHPMailer::CRLF, 10);
$oklen = str_repeat(str_repeat('0', PHPMailer::MAX_LINE_LENGTH) . PHPMailer::CRLF, 2);
$badlen = str_repeat(str_repeat('1', PHPMailer::MAX_LINE_LENGTH + 1) . PHPMailer::CRLF, 2);

$this->Mail->Body = "This message contains lines that are too long.".
PHPMailer::CRLF . PHPMailer::CRLF . $oklen . $badlen . $oklen;
PHPMailer::CRLF . $oklen . $badlen . $oklen;
$this->assertTrue(
PHPMailer::hasLineLongerThanMax($this->Mail->Body),
'Test content does not contain long lines!'
);
$this->Mail->isHTML();
$this->buildBody();
$this->Mail->AltBody = $this->Mail->Body;
$this->Mail->Encoding = '8bit';
$this->Mail->preSend();
$message = $this->Mail->getSentMIMEMessage();
Expand All @@ -1344,7 +1346,7 @@ public function testShortBody()
$oklen = str_repeat(str_repeat('0', PHPMailer::MAX_LINE_LENGTH) . PHPMailer::CRLF, 10);

$this->Mail->Body = "This message does not contain lines that are too long.".
PHPMailer::CRLF . PHPMailer::CRLF . $oklen;
PHPMailer::CRLF . $oklen;
$this->assertFalse(
PHPMailer::hasLineLongerThanMax($this->Mail->Body),
'Test content contains long lines!'
Expand Down

0 comments on commit c27c159

Please sign in to comment.