You are here

protected function ExposedFormUITest::setUp in Drupal 8

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()

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) {
  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.');
}