You are here

protected function ExposedFormUITest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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 47

Class

ExposedFormUITest
Tests exposed forms UI functionality.

Namespace

Drupal\Tests\views_ui\Functional

Code

protected function setUp($import_test_views = TRUE) : void {
  parent::setUp($import_test_views);
  $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.';
}