function DbLogTest::testSameTimestampEntries
Same name in other branches
- 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::testSameTimestampEntries()
- 8.9.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::testSameTimestampEntries()
- 11.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::testSameTimestampEntries()
Tests sorting for entries with the same timestamp.
File
-
core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php, line 888
Class
- DbLogTest
- Verifies log entries and user access based on permissions.
Namespace
Drupal\Tests\dblog\FunctionalCode
public function testSameTimestampEntries() : void {
$this->drupalLogin($this->adminUser);
$this->generateLogEntries(1, [
'timestamp' => 1498062000,
'type' => 'same_time',
'message' => 'First',
]);
$this->generateLogEntries(1, [
'timestamp' => 1498062000,
'type' => 'same_time',
'message' => 'Second',
]);
$this->generateLogEntries(1, [
'timestamp' => 1498062000,
'type' => 'same_time',
'message' => 'Third',
]);
$this->drupalGet('admin/reports/dblog');
$entries = $this->getLogEntries();
$this->assertEquals('Third Entry #0', $entries[0]['message']);
$this->assertEquals('Second Entry #0', $entries[1]['message']);
$this->assertEquals('First Entry #0', $entries[2]['message']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.