You are here

protected function MessageDigestTest::getAllMessageDigests in Message Digest 8

Returns all rows from the message_digest table.

Return value

array An array of all table rows, keyed by ID.

Throws

\Exception Thrown when the database connection is not available on the container.

2 calls to MessageDigestTest::getAllMessageDigests()
MessageDigestTest::assertRowCount in tests/src/Kernel/MessageDigestTest.php
Checks that the message_digest table contains the expected number of rows.
MessageDigestTest::testOrphanedEntityReferences in tests/src/Kernel/MessageDigestTest.php
Tests that the message_digest table is cleaned up when deleting entities.

File

tests/src/Kernel/MessageDigestTest.php, line 580

Class

MessageDigestTest
Kernel tests for Message Digest.

Namespace

Drupal\Tests\message_digest\Kernel

Code

protected function getAllMessageDigests() {
  return $this->container
    ->get('database')
    ->select('message_digest', 'm')
    ->fields('m')
    ->execute()
    ->fetchAllAssoc('id');
}