You are here

public function DbLogTest::testLogEventNotFoundPage in Drupal 8

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

Test not-existing log event page.

File

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

Class

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

Namespace

Drupal\Tests\dblog\Functional

Code

public function testLogEventNotFoundPage() {

  // Login the admin user.
  $this
    ->drupalLogin($this->adminUser);

  // Try to read details of not existing event.
  $this
    ->drupalGet('admin/reports/dblog/event/999999');

  // Verify 404 response.
  $this
    ->assertSession()
    ->statusCodeEquals(404);
}