function DbLogTest::testLogEventNotFoundPage

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

Tests not-existing log event page.

1 call to DbLogTest::testLogEventNotFoundPage()
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 224

Class

DbLogTest
Verifies log entries and user access based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

protected function testLogEventNotFoundPage() : void {
    // Login the admin user.
    $this->drupalLogin($this->adminUser);
    // Try to read details of non-existent event.
    $this->drupalGet('admin/reports/dblog/event/999999');
    // Verify 404 response.
    $this->assertSession()
        ->statusCodeEquals(404);
}

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