You are here

protected function UpdateNonExistentTest::assertCleanListCount in Feeds 8.3

Asserts that no items exist on the clean list for the given feed.

Parameters

int $expected_count: The amount of expected items on the clean list.

\Drupal\feeds\FeedInterface $feed: The feed to check the clean list for.

3 calls to UpdateNonExistentTest::assertCleanListCount()
UpdateNonExistentTest::assertCleanListEmpty in tests/src/Kernel/UpdateNonExistentTest.php
Asserts that no items exist on the clean list for the given feed.
UpdateNonExistentTest::testEmptyCleanListAfterClearingStates in tests/src/Kernel/UpdateNonExistentTest.php
Tests if the feeds clean list gets empty after clearing states.
UpdateNonExistentTest::testEmptyCleanListAfterDeletingFeed in tests/src/Kernel/UpdateNonExistentTest.php
Tests if the feeds clean list gets empty after deleting feed.

File

tests/src/Kernel/UpdateNonExistentTest.php, line 56

Class

UpdateNonExistentTest
Tests the feature of updating items that are no longer available in the feed.

Namespace

Drupal\Tests\feeds\Kernel

Code

protected function assertCleanListCount($expected_count, FeedInterface $feed) {
  $count = $this->container
    ->get('database')
    ->select('feeds_clean_list')
    ->fields('feeds_clean_list', [])
    ->condition('feed_id', $feed
    ->id())
    ->countQuery()
    ->execute()
    ->fetchField();
  $this
    ->assertEquals($expected_count, $count);
}