function PreprocessPagerTest::testPaginationHeadingLevelInvalid
Same name and namespace in other branches
- 10 core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php \Drupal\Tests\system\Unit\Pager\PreprocessPagerTest::testPaginationHeadingLevelInvalid()
Test with an invalid #pagination_heading_level.
@covers ::preprocessPager
File
-
core/
modules/ system/ tests/ src/ Unit/ Pager/ PreprocessPagerTest.php, line 168
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.