function FieldDefaultValueCallbackTest::setUp

Same name and namespace in other branches
  1. 8.9.x core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php \Drupal\Tests\field\Functional\FieldDefaultValueCallbackTest::setUp()
  2. 10 core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php \Drupal\Tests\field\Functional\FieldDefaultValueCallbackTest::setUp()
  3. 11.x core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php \Drupal\Tests\field\Functional\FieldDefaultValueCallbackTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/field/tests/src/Functional/FieldDefaultValueCallbackTest.php, line 38

Class

FieldDefaultValueCallbackTest
Tests the default value callback.

Namespace

Drupal\Tests\field\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->fieldName = 'field_test';
    // Create Article node types.
    if ($this->profile != 'standard') {
        $this->drupalCreateContentType([
            'type' => 'article',
            'name' => 'Article',
        ]);
    }
}

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