From 83631203f872f9b5b90d9f227c98a202a84a0f1e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 30 May 2009 11:12:12 +0000 Subject: - Patch #462310 by jpetso: generate valid XML and make sure the tests work when clean URLs can't be enabled. --- modules/aggregator/aggregator.test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/aggregator/aggregator.test') diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 3d41055c5..aa9e1db59 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -55,7 +55,10 @@ class AggregatorTestCase extends DrupalWebTestCase { function getFeedEditArray($feed_url = NULL) { $feed_name = $this->randomName(10); if (!$feed_url) { - $feed_url = $GLOBALS['base_url'] . '/rss.xml?feed=' . $feed_name; + $feed_url = url('rss.xml', array( + 'query' => 'feed=' . $feed_name, + 'absolute' => TRUE, + )); } $edit = array( 'title' => $feed_name, @@ -169,6 +172,10 @@ class AggregatorTestCase extends DrupalWebTestCase { * Path to valid OPML file. */ function getValidOpml($feeds) { + // Properly escape URLs so that XML parsers don't choke on them. + foreach ($feeds as &$feed) { + $feed['url'] = htmlspecialchars($feed['url']); + } /** * Does not have an XML declaration, must pass the parser. */ -- cgit v1.2.3