function PreprocessPagerTest::testPaginationHeadingLevelInvalid
Test with an invalid #pagination_heading_level.
@legacy-covers ::preprocessPager
File
- 
              core/
modules/ system/ tests/ src/ Unit/ Pager/ PreprocessPagerTest.php, line 180  
Class
- PreprocessPagerTest
 - Tests pager preprocessing.
 
Namespace
Drupal\Tests\system\Unit\PagerCode
public function testPaginationHeadingLevelInvalid() : void {
  $variables = [
    'pager' => [
      '#element' => '2',
      '#pagination_heading_level' => 'not-a-heading-element',
      '#parameters' => [],
      '#quantity' => '2',
      '#route_name' => '',
      '#tags' => '',
    ],
  ];
  $this->pagerPreprocess
    ->preprocessPager($variables);
  $this->assertEquals('h4', $variables['pagination_heading_level']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.