assertFormOptions example



  /** * Tests the views area display_link handler. */
  public function testAreaDisplayLink() {
    $view = Views::getView('test_view');

    // Assert only path-based displays are available in the display link     // settings form.     $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');
    
Home | Imprint | This part of the site doesn't use cookies.