Commit d78f6a63 authored by Dries's avatar Dries

- Patch #61456 by jeffschuler, edmund.kwok, jdefay, David_Rothstein, csevb10,...

- Patch #61456 by jeffschuler, edmund.kwok, jdefay, David_Rothstein, csevb10, alex_b, xjm, Steve Dondley: Aggregator titles display quotes and other characters with HTML entity equivalents badly (write tests).
parent 2b08a88c
......@@ -266,6 +266,10 @@ EOF;
return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_atom.xml';
}
function getHtmlEntitiesSample() {
return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_title_entities.xml';
}
/**
* Creates sample article nodes.
*
......@@ -915,4 +919,15 @@ class FeedParserTestCase extends AggregatorTestCase {
$this->assertText('Some text.');
$this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', array(':link' => 'http://example.org/2003/12/13/atom03'))->fetchField(), 'Atom entry id element is parsed correctly.');
}
/**
* Tests a feed that uses HTML entities in item titles.
*/
function testHtmlEntitiesSample() {
$feed = $this->createFeed($this->getHtmlEntitiesSample());
aggregator_refresh($feed);
$this->drupalGet('aggregator/sources/' . $feed->fid);
$this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
$this->assertText("Quote" Amp&");
}
}
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