function AggregatorTestCase::getDefaultFeedItemCount

Returns the count of the randomly created feed array.

Return value

Number of feed items on default feed created by createFeed().

3 calls to AggregatorTestCase::getDefaultFeedItemCount()

File

drupal/modules/aggregator/aggregator.test, line 85
Tests for aggregator.module.

Class

AggregatorTestCase
Defines a base class for testing the Aggregator module.

Code

function getDefaultFeedItemCount() {

  // Our tests are based off of rss.xml, so let's find out how many elements should be related.
  $feed_count = db_query_range('SELECT COUNT(*) FROM {node} n WHERE n.promote = 1 AND n.status = 1', 0, variable_get('feed_default_items', 10))
    ->fetchField();
  return $feed_count > 10 ? 10 : $feed_count;
}