renderDisplayLink example

'pager_element' => 1,
      'view_base_path' => 1,
      AjaxResponseSubscriber::AJAX_REQUEST_PARAMETER => 1,
      FormBuilderInterface::AJAX_FORM_REQUEST => 1,
      MainContentViewSubscriber::WRAPPER_FORMAT => 1,
    ]));
    $this->container->set('request_stack', $request_stack);
    $view->destroy();
    $view->setDisplay('page_1');
    $view->setCurrentPage(2);
    $this->executeView($view[1]);
    $this->assertSame('<a href="/page_1/1?name=John&amp;sort_by=created&amp;sort_order=ASC&amp;keep=keep&amp;keep_another=1&amp;page=1" class="views-display-link views-display-link-page_1 is-active">Page 1</a>', $this->renderDisplayLink($view, 'display_link_1'));
    $this->assertSame('<a href="/page_2/1?name=John&amp;sort_by=created&amp;sort_order=ASC&amp;keep=keep&amp;keep_another=1&amp;page=1" class="views-display-link views-display-link-page_2">Page 2</a>', $this->renderDisplayLink($view, 'display_link_2'));

    // Assert the validation adds warning messages when a display link is added     // to a display with different filter criteria, sort criteria, pager     // settings or contextual filters. Since all options are added to the     // default display there currently should be no warning messages.     $this->assertNoWarningMessages($view);

    // Assert the message are shown when changing the filter criteria of page_1.     $filters = [
      'name' => [
        
Home | Imprint | This part of the site doesn't use cookies.