function AggregatorTestCase::getFeedCategories in Drupal 7
Pulls feed categories from {aggregator_category_feed} table.
Parameters
$feed: Feed object representing the feed.
2 calls to AggregatorTestCase::getFeedCategories()
- CategorizeFeedItemTestCase::testCategorizeFeedItem in modules/
aggregator/ aggregator.test - Checks that children of a feed inherit a defined category.
- CategorizeFeedTestCase::testCategorizeFeed in modules/
aggregator/ aggregator.test - Creates a feed and makes sure you can add/delete categories to it.
File
- modules/
aggregator/ aggregator.test, line 160 - Tests for aggregator.module.
Class
- AggregatorTestCase
- Defines a base class for testing the Aggregator module.
Code
function getFeedCategories($feed) {
// add the categories to the feed so we can use them
$result = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = :fid', array(
':fid' => $feed->fid,
));
foreach ($result as $category) {
$feed->categories[] = $category->cid;
}
}