From 6c4ba233baefa0ea6b8e3f68d2e9a1c9c104703a Mon Sep 17 00:00:00 2001 From: James Hall Date: Sun, 26 Aug 2012 00:23:32 +0100 Subject: [PATCH] Fix testSendRenderWithImage when non running on port 80 --- lib/Cake/Test/Case/Network/Email/CakeEmailTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index cde649558..872dbfef3 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -1118,8 +1118,12 @@ class CakeEmailTest extends CakeTestCase { $this->CakeEmail->config(array('empty')); $this->CakeEmail->template('image'); $this->CakeEmail->emailFormat('html'); - $server = env('SERVER_NAME') ? env('SERVER_NAME') : 'localhost'; + + if (env('SERVER_PORT') != 80) { + $server .= ':' . env('SERVER_PORT'); + } + $expected = 'cool image'; $result = $this->CakeEmail->send(); $this->assertContains($expected, $result['message']);