You are here

protected function FeedsWebTestCase::assertNodeCount in Feeds 7.2

Asserts that the given number of nodes exist.

Parameters

int $expected_node_count: The expected number of nodes in the node table.

string $message: (optional) The message to assert.

9 calls to FeedsWebTestCase::assertNodeCount()
FeedsFileHTTPTestCase::setUpMultipleCronRuns in tests/feeds_fetcher_http.test
Configures the evironment so that multiple cron runs are needed to complete an import.
FeedsFileHTTPTestCase::testAbortImportWhenTemporaryFileIsDeleted in tests/feeds_fetcher_http.test
Tests that an import is aborted when the temporary file in the in_progress dir is removed.
FeedsFileHTTPTestCase::testImportSourceWithMultipleCronRuns in tests/feeds_fetcher_http.test
Tests importing source that needs multiple cron runs.
FeedsOgTest::testImportOgReferenceWithoutAuthorizing in tests/feeds_og.test
Tests importing content for a group using the web UI.
FeedsOgTest::testImportOgReferenceWithoutAuthorizingOnCron in tests/feeds_og.test
Tests importing content for a group on cron runs.

... See full list

File

tests/feeds.test, line 403
Common functionality for all Feeds tests.

Class

FeedsWebTestCase
Test basic Data API functionality.

Code

protected function assertNodeCount($expected_node_count, $message = '') {
  if (!$message) {
    $message = '@expected nodes have been created (actual: @count).';
  }
  $node_count = db_select('node')
    ->fields('node', array())
    ->countQuery()
    ->execute()
    ->fetchField();
  $this
    ->assertEqual($expected_node_count, $node_count, format_string($message, array(
    '@expected' => $expected_node_count,
    '@count' => $node_count,
  )));
}