diff --git a/tests/api/RSSFeedTest.php b/tests/api/RSSFeedTest.php
index 868b502e7..02ac4f707 100644
--- a/tests/api/RSSFeedTest.php
+++ b/tests/api/RSSFeedTest.php
@@ -7,13 +7,16 @@ class RSSFeedTest extends SapphireTest {
$list->push(new RSSFeedTest_ItemA());
$list->push(new RSSFeedTest_ItemB());
$list->push(new RSSFeedTest_ItemC());
+
+ $origServer = $_SERVER;
+ $_SERVER['HTTP_HOST'] = 'www.example.org';
+ $_SERVER['SCRIPT_NAME'] = '/sapphire/main.php';
$rssFeed = new RSSFeed($list, "http://www.example.com", "Test RSS Feed", "Test RSS Feed Description");
$content = $rssFeed->feedContent();
// Debug::message($content);
-
- $this->assertContains('' . Director::absoluteBaseURL() . 'item-a/', $content);
+ $this->assertContains('http://www.example.org/item-a/', $content);
$this->assertContains('http://www.example.com/item-b.html', $content);
$this->assertContains('http://www.example.com/item-c.html', $content);
@@ -37,7 +40,8 @@ class RSSFeedTest extends SapphireTest {
$this->assertContains('ItemA AltContent', $content);
$this->assertContains('ItemB AltContent', $content);
$this->assertContains('ItemC AltContent', $content);
-
+
+ $_SERVER = $origServer;
}
}