From fcb7714e2e8dfc355f2d0f78b6b9d38e6b8ebf2c Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 19 Apr 2012 22:17:19 -0400 Subject: [PATCH] Fix failing test. --- lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 2f60ca9eece..fdfee55e58d 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -850,7 +850,8 @@ public function testMessageId() { $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); $result = DebugCompTransport::$lastEmail; - $this->assertRegExp('/Message-ID: \<[a-f0-9]{8}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{12}@' . env('HTTP_HOST') . '\>\n/', $result); + $host = env('HTTP_HOST') ? env('HTTP_HOST') : php_uname('n'); + $this->assertRegExp('/Message-ID: \<[a-f0-9]{8}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{12}@' . $host . '\>\n/', $result); $this->Controller->EmailTest->messageId = '<22091985.998877@example.com>';