template_preprocess_pager example

public function testQuantityNotSet() {
    require_once $this->root . '/core/includes/theme.inc';
    $variables = [
      'pager' => [
        '#element' => '',
        '#parameters' => [],
        '#quantity' => '',
        '#route_name' => '',
        '#tags' => '',
      ],
    ];
    template_preprocess_pager($variables);

    $this->assertEquals(['first', 'previous']array_keys($variables['items']));
  }

  /** * Tests template_preprocess_pager() when a #quantity value is passed. * * @covers ::template_preprocess_pager */
  public function testQuantitySet() {
    require_once $this->root . '/core/includes/theme.inc';
    
Home | Imprint | This part of the site doesn't use cookies.