function AggregatorTestCase::getDefaultFeedItemCount in Drupal 7
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()
- AggregatorRenderingTestCase::testBlockLinks in modules/
aggregator/ aggregator.test - Adds a feed block to the page and checks its links.
- CategorizeFeedItemTestCase::testCategorizeFeedItem in modules/
aggregator/ aggregator.test - Checks that children of a feed inherit a defined category.
- UpdateFeedItemTestCase::testUpdateFeedItem in modules/
aggregator/ aggregator.test - Tests running "update items" from 'admin/config/services/aggregator' page.
File
- 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;
}