You are here

protected function FieldTestBase::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUp()
  2. 10 core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUp()

Overrides ViewTestBase::setUp

1 call to FieldTestBase::setUp()
FieldUITest::setUp in core/modules/field/tests/src/Functional/Views/FieldUITest.php
1 method overrides FieldTestBase::setUp()
FieldUITest::setUp in core/modules/field/tests/src/Functional/Views/FieldUITest.php

File

core/modules/field/tests/src/Functional/Views/FieldTestBase.php, line 45

Class

FieldTestBase
Provides some helper methods for testing fieldapi integration into views.

Namespace

Drupal\Tests\field\Functional\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);

  // Ensure the page node type exists.
  NodeType::create([
    'type' => 'page',
    'name' => 'page',
  ])
    ->save();
  ViewTestData::createTestViews(static::class, [
    'field_test_views',
  ]);
}