private function DbLogTest::verifyRowLimit in Drupal 10
Same name and namespace in other branches
- 8 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyRowLimit()
- 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyRowLimit()
Verifies setting of the database log row limit.
Parameters
int $row_limit: The row limit.
File
- core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php, line 272
Class
- DbLogTest
- Generate events and verify dblog entries; verify user access to log reports based on permissions.
Namespace
Drupal\Tests\dblog\FunctionalCode
private function verifyRowLimit($row_limit) {
// Change the database log row limit.
$edit = [];
$edit['dblog_row_limit'] = $row_limit;
$this
->drupalGet('admin/config/development/logging');
$this
->submitForm($edit, 'Save configuration');
$this
->assertSession()
->statusCodeEquals(200);
// Check row limit variable.
$current_limit = $this
->config('dblog.settings')
->get('row_limit');
$this
->assertEquals($current_limit, $row_limit, new FormattableMarkup('[Cache] Row limit variable of @count equals row limit of @limit', [
'@count' => $current_limit,
'@limit' => $row_limit,
]));
}