function AggregatorTestCase::getFeedCategories
7.x aggregator.test | AggregatorTestCase::getFeedCategories($feed) |
Pulls feed categories from {aggregator_category_feed} table.
Parameters
$feed: Feed object representing the feed.
2 calls to AggregatorTestCase::getFeedCategories()
- CategorizeFeedItemTestCase::testCategorizeFeedItem in drupal-7.x/
modules/ aggregator/ aggregator.test - Checks that children of a feed inherit a defined category.
- CategorizeFeedTestCase::testCategorizeFeed in drupal-7.x/
modules/ aggregator/ aggregator.test - Creates a feed and makes sure you can add more than one category to it.
File
- drupal-7.x/
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;
}
}