diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index ba52d3955..b30e2d8a8 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -1623,7 +1623,7 @@ class CakeEmailTest extends CakeTestCase { } public function testWrapLongLine() { - $message = '' . str_repeat('1234567890', 100) . ""; + $message = '' . str_repeat('x', CakeEmail::LINE_LENGTH_MUST) . ""; $this->CakeEmail->reset(); $this->CakeEmail->transport('Debug'); @@ -1632,7 +1632,27 @@ class CakeEmailTest extends CakeTestCase { $this->CakeEmail->subject('Wordwrap Test'); $this->CakeEmail->config(array('empty')); $result = $this->CakeEmail->send($message); - $expected = "' . str_repeat('1234567890', 100) . "\r\n\r\n\r\n"; + $expected = "' . str_repeat('x', CakeEmail::LINE_LENGTH_MUST) . "\r\n\r\n\r\n"; + $this->assertEquals($expected, $result['message']); + } + + public function testWrapIncludeTag() { + $message = 'CakePHP'; + + $this->CakeEmail->reset(); + $this->CakeEmail->transport('Debug'); + $this->CakeEmail->from('cake@cakephp.org'); + $this->CakeEmail->to('cake@cakephp.org'); + $this->CakeEmail->subject('Wordwrap Test'); + $this->CakeEmail->config(array('empty')); + $result = $this->CakeEmail->send($message); + $expected = "{$message}\r\n\r\n"; + $this->assertEquals($expected, $result['message']); + + $message = 'fooCakeEmail->send($message); + $expected = "{$message}\r\n\r\n"; $this->assertEquals($expected, $result['message']); }