You are here

function FeedsRSStoNodesTest::assertFeedItemCount in Feeds 8.2

Check that the total number of entries in the feeds_item table is correct.

2 calls to FeedsRSStoNodesTest::assertFeedItemCount()
FeedsRSStoNodesTest::test in lib/Drupal/feeds/Tests/FeedsRSStoNodesTest.php
Test node creation, refreshing/deleting feeds and feed items.
FeedsRSStoNodesTest::testOddFeedSchemes in lib/Drupal/feeds/Tests/FeedsRSStoNodesTest.php
Test using non-normal URLs like feed:// and webcal://.

File

lib/Drupal/feeds/Tests/FeedsRSStoNodesTest.php, line 319
Tests for plugins/FeedsNodeProcessor.inc.

Class

FeedsRSStoNodesTest
Test aggregating a feed as node items.

Namespace

Drupal\feeds\Tests

Code

function assertFeedItemCount($num) {
  $count = db_query("SELECT COUNT(*) FROM {feeds_item} WHERE entity_type = 'node'")
    ->fetchField();
  $this
    ->assertEqual($count, $num, 'Accurate number of items in database.');
}