function DbLogTest::verifyRowLimit
Same name in other branches
- 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyRowLimit()
- 8.9.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifyRowLimit()
- 10 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.
1 call to DbLogTest::verifyRowLimit()
- DbLogTest::testDbLog in core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php - Tests Database Logging module functionality through interfaces.
File
-
core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php, line 308
Class
- DbLogTest
- Verifies log entries and user access based on permissions.
Namespace
Drupal\Tests\dblog\FunctionalCode
private function verifyRowLimit($row_limit) : void {
// 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()
->statusMessageContains('The configuration options have been saved.');
$this->assertSession()
->statusCodeEquals(200);
// Check row limit variable.
$current_limit = $this->config('dblog.settings')
->get('row_limit');
$this->assertEquals($current_limit, $row_limit, "[Cache] Row limit variable of {$current_limit} equals row limit of {$row_limit}");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.