You are here

function AggregatorTestCase::getCategories in Drupal 7

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
Tests for aggregator.module.

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