function AggregatorTestCase::getCategories
Pulls categories from {aggregator_category} table.
Return value
An associative array keyed by category ID and values are set to the category names.
2 calls to AggregatorTestCase::getCategories()
- 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 175
Class
- AggregatorTestCase
- Defines a base class for testing the Aggregator module.
Code
function getCategories() {
$categories = array();
$result = db_query('SELECT * FROM {aggregator_category}');
foreach ($result as $category) {
$categories[$category->cid] = $category;
}
return $categories;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.