You are here

protected function DeleteOrphanedMessagesUpdateTest::assertRowCount in Message Digest 8

Checks that the message_digest table contains the expected number of rows.

Parameters

int $expected_count: The expected number of rows.

1 call to DeleteOrphanedMessagesUpdateTest::assertRowCount()
DeleteOrphanedMessagesUpdateTest::testUpdate in tests/src/Functional/Update/DeleteOrphanedMessagesUpdateTest.php
Tests the post-update hook.

File

tests/src/Functional/Update/DeleteOrphanedMessagesUpdateTest.php, line 56

Class

DeleteOrphanedMessagesUpdateTest
Tests the post-update hook that cleans up orphaned messages.

Namespace

Drupal\Tests\message_digest\Functional\Update

Code

protected function assertRowCount($expected_count) {
  $actual_count = \Drupal::database()
    ->select('message_digest', 'md')
    ->countQuery()
    ->execute()
    ->fetchField();
  $this
    ->assertEquals($expected_count, $actual_count);
}