function DbLogTest::verifyEvents

Same name and namespace in other branches
  1. 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyEvents()
  2. 8.9.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyEvents()
  3. 10 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 415

Class

DbLogTest
Verifies log entries and user access based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

private function verifyEvents() {
    // Invoke events.
    $this->doUser();
    $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
    $this->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
    ]);
    $this->doNode('article');
    $this->doNode('page');
    // 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.
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.