protected function CommonSyndicationParserTestCase::readFeed in Feeds 7.2
Same name and namespace in other branches
- 6 tests/common_syndication_parser.test \CommonSyndicationParserTestCase::readFeed()
- 7 tests/common_syndication_parser.test \CommonSyndicationParserTestCase::readFeed()
Helper to read a feed.
5 calls to CommonSyndicationParserTestCase::readFeed()
- CommonSyndicationParserTestCase::_testAtomEntriesWithoutBaseUrl in tests/
common_syndication_parser.test - Tests if the base url is prepended for entries without base url.
- CommonSyndicationParserTestCase::_testAtomGeoRSS in tests/
common_syndication_parser.test - Test Geo RSS in Atom feed.
- CommonSyndicationParserTestCase::_testAtomGeoRSSWithoutAuthor in tests/
common_syndication_parser.test - Tests parsing an Atom feed without an author.
- 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 131 - Tests for the common syndication parser.
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;
}