function AreaDisplayLinkTest::assertFormOptions
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php \Drupal\Tests\views\Kernel\Handler\AreaDisplayLinkTest::assertFormOptions()
- 10 core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php \Drupal\Tests\views\Kernel\Handler\AreaDisplayLinkTest::assertFormOptions()
- 11.x core/modules/views/tests/src/Kernel/Handler/AreaDisplayLinkTest.php \Drupal\Tests\views\Kernel\Handler\AreaDisplayLinkTest::assertFormOptions()
Assert the display options contains only path based displays.
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 306
Class
- AreaDisplayLinkTest
- Tests the core views_handler_area_display_link handler.
Namespace
Drupal\Tests\views\Kernel\HandlerCode
protected function assertFormOptions(ViewExecutable $view, $display_link_id) {
$form = [];
$form_state = new FormState();
$view->display_handler
->getHandler('header', $display_link_id)
->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.