From b346c4af8e0f927e80e6166a33e402d0f703ee37 Mon Sep 17 00:00:00 2001 From: euromark Date: Sat, 29 Jun 2013 15:16:58 +0200 Subject: [PATCH] Test to proof that render itself should handle the boundary. --- .../Test/Case/Network/Email/CakeEmailTest.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 85b9b19b4..a3ace7759 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -65,6 +65,14 @@ class TestCakeEmail extends CakeEmail { return $this->_encode($text); } +/** + * Render to protected method + * + */ + public function render($content) { + return $this->_render($content); + } + } /* @@ -1484,6 +1492,22 @@ class CakeEmailTest extends CakeTestCase { $this->assertSame($expected, $result); } +/** + * testRender method + * + * @return void + */ + public function testRenderWithLayoutAndAttachment() { + $this->CakeEmail->emailFormat('html'); + $this->CakeEmail->template('html', 'default'); + $this->CakeEmail->attachments(array(CAKE . 'basics.php')); + $result = $this->CakeEmail->render(array()); + $this->assertNotEmpty($result); + + $result = $this->CakeEmail->getBoundary(); + $this->assertNotEmpty($result); + } + /** * testConstructWithConfigArray method *