function TableSortLegacyTest::testQueryParameters

Tests deprecation of the tablesort_get_query_parameters() function.

@expectedDeprecation tablesort_get_query_parameters() is deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use \Drupal\Core\Utility\TableSort::getQueryParameters() instead. See https://www.drupal.org/node/3009182

File

core/tests/Drupal/KernelTests/Core/Theme/TableSortLegacyTest.php, line 45

Class

TableSortLegacyTest
Deprecation tests cases for the tablesort.inc file functions.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testQueryParameters() {
    $parameters = tablesort_get_query_parameters();
    $this->assertArrayNotHasKey('sort', $parameters);
    $this->assertArrayNotHasKey('order', $parameters);
}

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