1 dblog.test private DBLogTestCase::verifyDateFormat($date_format)

Verifies setting of the database log date format.

Parameters

strong $date_format: The date format to display in the log.

File

core/modules/dblog/tests/dblog.test, line 115
Tests for dblog.module.

Class

DBLogTestCase
Tests logging messages to the database.

Code

private function verifyDateFormat($date_format) {
  // Change the log date format.
  $edit = array();
  $edit['dblog_date_format'] = $date_format;
  $this->backdropPost('admin/config/development/logging', $edit, t('Save configuration'));
  $this->assertResponse(200);

  // Check date format config value.
  $current_format = config_get('system.core', 'log_date_format');
  $this->assertTrue($current_format == $date_format, format_string('[Cache] Date format of @current matches date format of @format', array('@current' => $current_format, '@format' => $date_format)));
}