function AreaDisplayLinkTest::assertFormOptions
Assert the display options contains only path based displays.
@internal
Parameters
\Drupal\views\ViewExecutable $view: The view to check.
string $display_link_id: The display link ID to check the options for.
1 call to AreaDisplayLinkTest::assertFormOptions()
- AreaDisplayLinkTest::testAreaDisplayLink in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaDisplayLinkTest.php  - Tests the views area display_link handler.
 
File
- 
              core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaDisplayLinkTest.php, line 314  
Class
- AreaDisplayLinkTest
 - Tests the core views_handler_area_display_link handler.
 
Namespace
Drupal\Tests\views\Kernel\HandlerCode
protected function assertFormOptions(ViewExecutable $view, string $display_link_id) : void {
  $form = [];
  $form_state = new FormState();
  /** @var \Drupal\views\Plugin\views\area\DisplayLink $display_handler */
  $display_handler = $view->display_handler
    ->getHandler('header', $display_link_id);
  $display_handler->buildOptionsForm($form, $form_state);
  $this->assertTrue(isset($form['display_id']['#options']['page_1']));
  $this->assertTrue(isset($form['display_id']['#options']['page_2']));
  $this->assertFalse(isset($form['display_id']['#options']['block_1']));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.