function AggregatorTestBase::getFeedCategories

Pull feed categories from aggregator_category_feed table.

Parameters

$feed: Feed object representing the feed.

2 calls to AggregatorTestBase::getFeedCategories()
CategorizeFeedItemTest::testCategorizeFeedItem in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/CategorizeFeedItemTest.php
If a feed has a category, make sure that the children inherit that categorization.
CategorizeFeedTest::testCategorizeFeed in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/CategorizeFeedTest.php
Create a feed and make sure you can add more than one category to it.

File

drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php, line 169
Definition of Drupal\aggregator\Tests\AggregatorTestBase.

Class

AggregatorTestBase
Defines a base class for testing aggregator.module.

Namespace

Drupal\aggregator\Tests

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