private function DbLogTest::verifyBreadcrumbs in Drupal 9
Same name and namespace in other branches
- 8 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyBreadcrumbs()
- 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 347
Class
- DbLogTest
- Generate events and verify dblog entries; verify user access to log reports based on permissions.
Namespace
Drupal\Tests\dblog\FunctionalCode
private function verifyBreadcrumbs() {
// View the database log event page.
$query = Database::getConnection()
->select('watchdog');
$query
->addExpression('MIN([wid])');
$wid = $query
->execute()
->fetchField();
$this
->drupalGet('admin/reports/dblog/event/' . $wid);
$xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a';
$this
->assertEquals('Recent log messages', current($this
->xpath($xpath))
->getText(), 'DBLogs link displayed at breadcrumb in event page.');
}