function DbLogTest::verifyBreadcrumbs

Same name in other branches
  1. 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyBreadcrumbs()
  2. 8.9.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyBreadcrumbs()
  3. 10 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyBreadcrumbs()

Generates and then verifies breadcrumbs.

1 call to DbLogTest::verifyBreadcrumbs()
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 403

Class

DbLogTest
Verifies log entries and user access based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

private function verifyBreadcrumbs() : void {
    // View the database log event page.
    $query = Database::getConnection()->select('watchdog');
    $query->addExpression('MIN([wid])');
    $wid = $query->execute()
        ->fetchField();
    $trail = [
        '' => 'Home',
        'admin' => 'Administration',
        'admin/reports' => 'Reports',
        'admin/reports/dblog' => 'Recent log messages',
    ];
    $this->assertBreadcrumb('admin/reports/dblog/event/' . $wid, $trail);
}

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