1.20.x dblog.test DBLogTestCase::testDBLog()

Tests Database Logging module functionality through interfaces.

First logs in users, then creates database log events, and finally tests Database Logging module functionality through both the admin and user interfaces.

File

modules/dblog/tests/dblog.test, line 43
Tests for dblog.module.

Class

DBLogTestCase
Tests logging messages to the database.

Code

function testDBLog() {
  // Login the admin user.
  $this->backdropLogin($this->big_user);

  $row_limit = 1000;
  $this->verifyRowLimit($row_limit);
  // Remove seconds from date so this test is more likely to always pass.
  $date_format = 'M d, Y - j:ia';
  $this->verifyDateFormat($date_format);
  $this->verifyCron($row_limit);
  $this->verifyEvents();
  $this->verifyReports();

  // Login the regular user.
  $this->backdropLogin($this->any_user);
  $this->verifyReports(403);
}