mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 04:22:40 +00:00
Check line length to account for fence post.
When we have exactly 998 bytes CakeEmail should not emit an error. Refs #5948
This commit is contained in:
parent
ef820964e5
commit
b80a8947d7
3 changed files with 34 additions and 1 deletions
|
@ -2435,6 +2435,25 @@ HTML;
|
|||
$this->assertEquals($expected, $result['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that really long lines don't cause errors.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testReallyLongLine() {
|
||||
$this->CakeEmail->reset();
|
||||
$this->CakeEmail->config(array('empty'));
|
||||
$this->CakeEmail->transport('Debug');
|
||||
$this->CakeEmail->from('cake@cakephp.org');
|
||||
$this->CakeEmail->to('cake@cakephp.org');
|
||||
$this->CakeEmail->subject('Wordwrap Test');
|
||||
$this->CakeEmail->emailFormat('html');
|
||||
$this->CakeEmail->template('long_line', null);
|
||||
$result = $this->CakeEmail->send();
|
||||
$this->assertContains('<a>', $result['message'], 'First bits are included');
|
||||
$this->assertContains('x', $result['message'], 'Last byte are included');
|
||||
}
|
||||
|
||||
/**
|
||||
* CakeEmailTest::assertLineLengths()
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue