protected function CommonSyndicationParserTest::_testRSS2 in Feeds 8.2
Test RSS 2.
1 call to CommonSyndicationParserTest::_testRSS2()
- CommonSyndicationParserTest::test in lib/
Drupal/ feeds/ Tests/ CommonSyndicationParserTest.php - Dispatch tests, only use one entry point method testX to save time.
File
- lib/
Drupal/ feeds/ Tests/ CommonSyndicationParserTest.php, line 57 - Tests for the common syndication parser.
Class
- CommonSyndicationParserTest
- Test cases for common syndication parser library.
Namespace
Drupal\feeds\TestsCode
protected function _testRSS2() {
$string = $this
->readFeed('developmentseed.rss2');
$feed = common_syndication_parser_parse($string);
$this
->assertEqual($feed['title'], 'Development Seed - Technological Solutions for Progressive Organizations');
$this
->assertEqual($feed['items'][0]['title'], 'Open Atrium Translation Workflow: Two Way Translation Updates');
$this
->assertEqual($feed['items'][1]['url'], 'http://developmentseed.org/blog/2009/oct/05/week-dc-tech-october-5th-edition');
$this
->assertEqual($feed['items'][1]['guid'], '973 at http://developmentseed.org');
$this
->assertEqual($feed['items'][2]['guid'], '972 at http://developmentseed.org');
$this
->assertEqual($feed['items'][2]['timestamp'], 1254493864);
}