You are here

public function LoggingTest::testGetLoggingWrongKey in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php \Drupal\KernelTests\Core\Database\LoggingTest::testGetLoggingWrongKey()

Tests that getLog with a wrong key return an empty array.

File

core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php, line 138

Class

LoggingTest
Tests the query logging facility.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testGetLoggingWrongKey() {
  $result = Database::getLog('wrong');
  $this
    ->assertEquals([], $result, 'The function getLog with a wrong key returns an empty array.');
}