You are here

protected function CommonSyndicationParserTestCase::_testRSS10 in Feeds 7

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

Test RSS 1.0.

1 call to CommonSyndicationParserTestCase::_testRSS10()
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 41

Class

CommonSyndicationParserTestCase
Test cases for common syndication parser library.

Code

protected function _testRSS10() {
  $string = $this
    ->readFeed('magento.rss1');
  $feed = common_syndication_parser_parse($string);
  $this
    ->assertEqual($feed['title'], 'Magento Sites Network - A directory listing of Magento Commerce stores');
  $this
    ->assertEqual($feed['items'][0]['title'], 'Gezondheidswebwinkel');
  $this
    ->assertEqual($feed['items'][0]['url'], 'http://www.magentosites.net/store/2010/04/28/gezondheidswebwinkel/index.html');
  $this
    ->assertEqual($feed['items'][1]['url'], 'http://www.magentosites.net/store/2010/04/26/mybobinocom/index.html');
  $this
    ->assertEqual($feed['items'][1]['guid'], 'http://www.magentosites.net/node/3472');
  $this
    ->assertEqual($feed['items'][2]['guid'], 'http://www.magentosites.net/node/3471');
  $this
    ->assertEqual($feed['items'][2]['timestamp'], 1272285294);
}