You are here

protected function CommonSyndicationParserTest::_testRSS10 in Feeds 8.2

Test RSS 1.0.

1 call to CommonSyndicationParserTest::_testRSS10()
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 42
Tests for the common syndication parser.

Class

CommonSyndicationParserTest
Test cases for common syndication parser library.

Namespace

Drupal\feeds\Tests

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