protected function AreaDisplayLinkTest::assertFormOptions in Drupal 9
Same name and namespace in other branches
- 8 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']));
}