function ExposedFormUITest::setUp

Same name and namespace in other branches
  1. 11.x core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::setUp()
  2. 10 core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::setUp()
  3. 9 core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php \Drupal\Tests\views_ui\Functional\ExposedFormUITest::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) {
  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'] = t('A value is required if the label for this item is defined.');
  $this->groupFormUiErrors['missing_title'] = t('A label is required if the value for this item is defined.');
  $this->groupFormUiErrors['missing_title_empty_operator'] = t('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.