Skip to content
This repository
Browse code

Make test case use SERVER_NAME conditionally.

  • Loading branch information...
commit 591022f182df42c10af7fb0f6bd1d045bf557b40 1 parent f528bb2
Mark Story authored July 05, 2012
3  lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -1119,7 +1119,8 @@ public function testSendRenderWithImage() {
1119 1119
 		$this->CakeEmail->template('image');
1120 1120
 		$this->CakeEmail->emailFormat('html');
1121 1121
 
1122  
-		$expected = '<img src="http://' . env('SERVER_NAME') . '/img/image.gif" alt="cool image" width="100" height="100" />';
  1122
+		$server = env('SERVER_NAME') ? env('SERVER_NAME') : 'localhost';
  1123
+		$expected = '<img src="http://' . $server . '/img/image.gif" alt="cool image" width="100" height="100" />';
1123 1124
 		$result = $this->CakeEmail->send();
1124 1125
 		$this->assertContains($expected, $result['message']);
1125 1126
 	}

0 notes on commit 591022f

Please sign in to comment.
Something went wrong with that request. Please try again.