You are here

protected function ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php \Drupal\Tests\views_ui\Functional\ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions()

Saves the test_argument view with changes made to the argument handler both with and without specify_validation turned on.

Parameters

bool $specify_validation:

1 call to ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions()
ArgumentValidatorTest::testSpecifyValidation in core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php
Tests the 'Specify validation criteria' checkbox functionality.

File

core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php, line 53

Class

ArgumentValidatorTest
Tests the Argument validator through the UI.

Namespace

Drupal\Tests\views_ui\Functional

Code

protected function saveArgumentHandlerWithValidationOptions($specify_validation) {
  $options = [
    'options[validate][type]' => 'entity---node',
    'options[specify_validation]' => $specify_validation,
  ];
  $this
    ->drupalGet('admin/structure/views/nojs/handler/test_argument/default/argument/id');
  $this
    ->submitForm($options, 'Apply');
  $this
    ->drupalGet('admin/structure/views/view/test_argument');
  $this
    ->submitForm([], 'Save');
}