function AggregatorTestCase::getFeedCategories

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.