function ExposedFormUITest::setUp

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::setUp()
  2. 8.9.x core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::setUp()
  3. 10 core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::setUp()

Overrides UITestBase::setUp

File

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

Class

ExposedFormUITest
Tests exposed forms UI functionality.

Namespace

Drupal\Tests\views_ui\Functional

Code

protected function setUp($import_test_views = TRUE, $modules = [
    'views_test_config',
]) : void {
    parent::setUp($import_test_views, $modules);
    $this->drupalCreateContentType([
        'type' => 'article',
    ]);
    $this->drupalCreateContentType([
        'type' => 'page',
    ]);
    // Create some random nodes.
    for ($i = 0; $i < 5; $i++) {
        $this->drupalCreateNode();
    }
    // Error strings used in the grouped filter form validation.
    $this->groupFormUiErrors['missing_value'] = 'A value is required if the label for this item is defined.';
    $this->groupFormUiErrors['missing_title'] = 'A label is required if the value for this item is defined.';
    $this->groupFormUiErrors['missing_title_empty_operator'] = 'A label is required for the specified operator.';
}

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