You are here

private function DbLogTest::verifyEvents in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyEvents()

Generates and then verifies various types of events.

1 call to DbLogTest::verifyEvents()
DbLogTest::testDbLog in core/modules/dblog/tests/src/Functional/DbLogTest.php
Tests Database Logging module functionality through interfaces.

File

core/modules/dblog/tests/src/Functional/DbLogTest.php, line 360

Class

DbLogTest
Generate events and verify dblog entries; verify user access to log reports based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

private function verifyEvents() {

  // Invoke events.
  $this
    ->doUser();
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => t('Article'),
  ]);
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => t('Basic page'),
  ]);
  $this
    ->doNode('article');
  $this
    ->doNode('page');
  $this
    ->doNode('forum');

  // When a user account is canceled, any content they created remains but the
  // uid = 0. Records in the watchdog table related to that user have the uid
  // set to zero.
}