function ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php \Drupal\Tests\views_ui\Functional\ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions()
  2. 10 core/modules/views_ui/tests/src/Functional/ArgumentValidatorTest.php \Drupal\Tests\views_ui\Functional\ArgumentValidatorTest::saveArgumentHandlerWithValidationOptions()
  3. 11.x 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->drupalPostForm('admin/structure/views/nojs/handler/test_argument/default/argument/id', $options, t('Apply'));
    $this->drupalPostForm('admin/structure/views/view/test_argument', [], t('Save'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.