You are here

protected function EntityReferenceFieldDefaultValueTest::setUp in Drupal 9

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

Overrides BrowserTestBase::setUp

File

core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php, line 39

Class

EntityReferenceFieldDefaultValueTest
Tests entity reference field default values storage in CMI.

Namespace

Drupal\Tests\field\Functional\EntityReference

Code

protected function setUp() : void {
  parent::setUp();

  // Create default content type.
  $this
    ->drupalCreateContentType([
    'type' => 'reference_content',
  ]);
  $this
    ->drupalCreateContentType([
    'type' => 'referenced_content',
  ]);

  // Create admin user.
  $this->adminUser = $this
    ->drupalCreateUser([
    'access content',
    'administer content types',
    'administer node fields',
    'administer node form display',
    'bypass node access',
  ]);
  $this
    ->drupalLogin($this->adminUser);
}