function FieldValuesTest::setUp

Overrides BrowserTestBase::setUp

File

core/modules/layout_builder/tests/src/Functional/FieldValuesTest.php, line 34

Class

FieldValuesTest
Tests how Layout Builder handles changes to entity fields.

Namespace

Drupal\Tests\layout_builder\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->createContentType([
    'type' => 'bundle_for_testing_fields',
  ]);
  $this->drupalLogin($this->drupalCreateUser([
    'edit any bundle_for_testing_fields content',
    'configure any layout',
  ]));
  LayoutBuilderEntityViewDisplay::load('node.bundle_for_testing_fields.default')->createCopy('full')
    ->enableLayoutBuilder()
    ->setOverridable()
    ->save();
}

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