You are here

protected function CommonSyndicationParserTestCase::_testRSS2 in Feeds 6

Same name and namespace in other branches
  1. 7.2 tests/common_syndication_parser.test \CommonSyndicationParserTestCase::_testRSS2()
  2. 7 tests/common_syndication_parser.test \CommonSyndicationParserTestCase::_testRSS2()

Test RSS 2.

1 call to CommonSyndicationParserTestCase::_testRSS2()
CommonSyndicationParserTestCase::test in tests/common_syndication_parser.test
Dispatch tests, only use one entry point method testX to save time.

File

tests/common_syndication_parser.test, line 50

Class

CommonSyndicationParserTestCase
Test cases for common syndication parser library.

Code

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);
}