function PreprocessPagerTest::testPaginationHeadingLevelSet
Same name in other branches
- 11.x core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php \Drupal\Tests\system\Unit\Pager\PreprocessPagerTest::testPaginationHeadingLevelSet()
Tests template_preprocess_pager() when a #pagination_heading_level value is passed.
@covers ::template_preprocess_pager
File
-
core/
modules/ system/ tests/ src/ Unit/ Pager/ PreprocessPagerTest.php, line 144
Class
- PreprocessPagerTest
- Tests pager preprocessing.
Namespace
Drupal\Tests\system\Unit\PagerCode
public function testPaginationHeadingLevelSet() : void {
require_once $this->root . '/core/includes/theme.inc';
$variables = [
'pager' => [
'#element' => '2',
'#pagination_heading_level' => 'h5',
'#parameters' => [],
'#quantity' => '2',
'#route_name' => '',
'#tags' => '',
],
];
template_preprocess_pager($variables);
$this->assertEquals('h5', $variables['pagination_heading_level']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.