You are here

protected function MoveBlockRestrictionTest::setUp in Layout Builder Restrictions 8.2

Overrides LayoutBuilderRestrictionsTestBase::setUp

File

tests/src/FunctionalJavascript/MoveBlockRestrictionTest.php, line 42

Class

MoveBlockRestrictionTest
Tests moving blocks via the form.

Namespace

Drupal\Tests\layout_builder_restrictions\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access administration pages',
    'configure any layout',
    'administer blocks',
    'administer node display',
    'administer node fields',
    'access contextual links',
    'create and edit custom blocks',
  ]));
  $layout = Layout::create([
    'id' => 'alpha',
    'label' => 'Alpha',
    'targetEntityType' => 'node',
    'targetBundle' => 'bundle_with_section_field',
  ]);
  $layout
    ->save();
}