function FieldTestBase::setUp

Same name in other branches
  1. 9 core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUp()
  2. 8.9.x core/modules/field/src/Tests/Views/FieldTestBase.php \Drupal\field\Tests\Views\FieldTestBase::setUp()
  3. 8.9.x core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUp()
  4. 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
Sets up the test.
1 method overrides FieldTestBase::setUp()
FieldUITest::setUp in core/modules/field/tests/src/Functional/Views/FieldUITest.php
Sets up the test.

File

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

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, $modules = [
    'field_test_views',
]) : void {
    parent::setUp($import_test_views, $modules);
    // Ensure the page node type exists.
    NodeType::create([
        'type' => 'page',
        'name' => 'page',
    ])->save();
}

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