You are here

public function TableSortLegacyTest::testHeader in Drupal 8

Tests deprecation of the tablesort_header() function.

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

File

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

Class

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

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testHeader() {
  $cell_content = '';
  $cell_attributes = [];
  tablesort_header($cell_content, $cell_attributes, [], []);
  $this
    ->assertEquals('', $cell_content);
}