You are here

public function ManageDisplayTest::setUp in Field Group 8

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_group\Functional\ManageDisplayTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ManageDisplayTest.php, line 34

Class

ManageDisplayTest
Tests for managing display of entities.

Namespace

Drupal\Tests\field_group\Functional

Code

public function setUp() {
  parent::setUp();

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

  // Create content type, with underscores.
  $type_name = 'll4ma_test';
  $type = $this
    ->drupalCreateContentType([
    'name' => $type_name,
    'type' => $type_name,
  ]);
  $this->type = $type
    ->id();
}