function DbLogTest::verifySort

Same name in other branches
  1. 9 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifySort()
  2. 8.9.x core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifySort()
  3. 10 core/modules/dblog/tests/src/Functional/DbLogTest.php \Drupal\Tests\dblog\Functional\DbLogTest::verifySort()

Verifies the sorting functionality of the database logging reports table.

Parameters

string $sort: The sort direction.

string $order: The order by which the table should be sorted.

1 call to DbLogTest::verifySort()
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 441

Class

DbLogTest
Verifies log entries and user access based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

public function verifySort($sort = 'asc', $order = 'Date') : void {
    $this->drupalGet('admin/reports/dblog', [
        'query' => [
            'sort' => $sort,
            'order' => $order,
        ],
    ]);
    $this->assertSession()
        ->statusCodeEquals(200);
    $this->assertSession()
        ->pageTextContains('Recent log messages');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.