Browse files

Make test case use SERVER_NAME conditionally.

  • Loading branch information...
1 parent f528bb2 commit 591022f182df42c10af7fb0f6bd1d045bf557b40 @markstory markstory committed Jul 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
View
3 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -1119,7 +1119,8 @@ public function testSendRenderWithImage() {
$this->CakeEmail->template('image');
$this->CakeEmail->emailFormat('html');
- $expected = '<img src="http://' . env('SERVER_NAME') . '/img/image.gif" alt="cool image" width="100" height="100" />';
+ $server = env('SERVER_NAME') ? env('SERVER_NAME') : 'localhost';
+ $expected = '<img src="http://' . $server . '/img/image.gif" alt="cool image" width="100" height="100" />';
$result = $this->CakeEmail->send();
$this->assertContains($expected, $result['message']);
}

0 comments on commit 591022f

Please sign in to comment.