euromark 12 years ago
parent
commit
4005dc23ab
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Test/Case/Lib/Utility/UtilityTest.php

+ 5 - 1
Test/Case/Lib/Utility/UtilityTest.php

@@ -183,7 +183,11 @@ class UtilityTest extends MyCakeTestCase {
 
 		$_SERVER['HTTP_REFERER'] = '/foo/bar';
 		$res = Utility::getReferer(true);
-		$this->assertEquals(HTTP_BASE . env('HTTP_REFERER'), $res);
+		$base = HTTP_BASE;
+		if (!$base) {
+			$base = 'http://localhost/';
+		}
+		$this->assertEquals($base . env('HTTP_REFERER'), $res);
 	}
 
 	/**