function ViewsPreprocessTest::testPaginationHeadingLevelNotSet

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php \Drupal\Tests\views\Kernel\ViewsPreprocessTest::testPaginationHeadingLevelNotSet()

Tests template_preprocess_views_mini_pager() when no pagination_heading_level is passed.

@covers ::template_preprocess_views_mini_pager

File

core/modules/views/tests/src/Kernel/ViewsPreprocessTest.php, line 86

Class

ViewsPreprocessTest
Tests the preprocessing functionality in <a href="/api/drupal/core%21modules%21views%21views.theme.inc/10" title="Preprocessors and helper functions to make theming easier." class="local">views.theme.inc</a>.

Namespace

Drupal\Tests\views\Kernel

Code

public function testPaginationHeadingLevelNotSet() : void {
    require_once $this->root . '/core/modules/views/views.theme.inc';
    $variables = [
        'tags' => [],
        'quantity' => 9,
        'element' => 0,
        'parameters' => [],
    ];
    template_preprocess_views_mini_pager($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.