You are here

protected function CommonSyndicationParserTestCase::readFeed in Feeds 7

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

Helper to read a feed.

3 calls to CommonSyndicationParserTestCase::readFeed()
CommonSyndicationParserTestCase::_testAtomGeoRSS in tests/common_syndication_parser.test
Test Geo RSS in Atom feed.
CommonSyndicationParserTestCase::_testRSS10 in tests/common_syndication_parser.test
Test RSS 1.0.
CommonSyndicationParserTestCase::_testRSS2 in tests/common_syndication_parser.test
Test RSS 2.

File

tests/common_syndication_parser.test, line 89

Class

CommonSyndicationParserTestCase
Test cases for common syndication parser library.

Code

protected function readFeed($filename) {
  $feed = dirname(__FILE__) . '/feeds/' . $filename;
  $handle = fopen($feed, 'r');
  $string = fread($handle, filesize($feed));
  fclose($handle);
  return $string;
}