You are here

public function WidgetTest::setUp in Block field 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/WidgetTest.php, line 42

Class

WidgetTest
Test the block field widget.

Namespace

Drupal\Tests\block_field\Functional

Code

public function setUp() {
  parent::setUp();
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access administration pages',
    'access content',
    'administer content types',
    'administer node fields',
    'administer node form display',
    'administer nodes',
    'bypass node access',
  ]));
  $this
    ->drupalGet('node/add/block_node');
  $this
    ->submitForm([
    'title[0][value]' => 'Block field test',
    'field_block[0][plugin_id]' => 'views_block:items-block_1',
  ], 'Save');
  $this->blockNode = $this
    ->drupalGetNodeByTitle('Block field test');
}