private function DbLogTest::verifyRowLimit

Verifies setting of the database log row limit.

Parameters

int $row_limit: The row limit.

1 call to DbLogTest::verifyRowLimit()
DbLogTest::testDbLog in drupal/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php
Tests Database Logging module functionality through interfaces.

File

drupal/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php, line 85
Contains \Drupal\dblog\Tests\DbLogTest.

Class

DbLogTest
Tests logging messages to the database.

Namespace

Drupal\dblog\Tests

Code

private function verifyRowLimit($row_limit) {

  // Change the database log row limit.
  $edit = array();
  $edit['dblog_row_limit'] = $row_limit;
  $this
    ->drupalPost('admin/config/development/logging', $edit, t('Save configuration'));
  $this
    ->assertResponse(200);

  // Check row limit variable.
  $current_limit = config('dblog.settings')
    ->get('row_limit');
  $this
    ->assertTrue($current_limit == $row_limit, format_string('[Cache] Row limit variable of @count equals row limit of @limit', array(
    '@count' => $current_limit,
    '@limit' => $row_limit,
  )));
}