assertRenderedDisplayLinks example

    $view->setDisplay('page_1');
    $this->assertFormOptions($view, 'display_link_1');
    $this->assertFormOptions($view, 'display_link_2');
    $view->setDisplay('page_2');
    $this->assertFormOptions($view, 'display_link_1');
    $this->assertFormOptions($view, 'display_link_2');
    $view->setDisplay('block_1');
    $this->assertFormOptions($view, 'display_link_1');
    $this->assertFormOptions($view, 'display_link_2');

    // Assert the links are rendered correctly for all displays.     $this->assertRenderedDisplayLinks($view, 'page_1');
    $this->assertRenderedDisplayLinks($view, 'page_2');
    $this->assertRenderedDisplayLinks($view, 'block_1');

    // Assert some special request parameters are filtered from the display     // links.     $request_stack = new RequestStack();
    $request_stack->push(Request::create('page_1', 'GET', [
      'name' => 'John',
      'sort_by' => 'created',
      'sort_order' => 'ASC',
      'page' => 1,
      
Home | Imprint | This part of the site doesn't use cookies.