Commit 83631203 authored by Dries's avatar Dries

- Patch #462310 by jpetso: generate valid XML and make sure the tests work...

- Patch #462310 by jpetso: generate valid XML and make sure the tests work when clean URLs can't be enabled.
parent 79c566c7
......@@ -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.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment