You are here

public function ExtraFieldBrowserTestBase::setupContentEntityDisplay in Extra Field 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/ExtraFieldBrowserTestBase.php \Drupal\Tests\extra_field\Functional\ExtraFieldBrowserTestBase::setupContentEntityDisplay()

Setup the node type with view display.

Parameters

string $contentType: Name of node bundle to be generated.

1 call to ExtraFieldBrowserTestBase::setupContentEntityDisplay()
ExtraFieldDisplayUITest::setUp in tests/src/Functional/ExtraFieldDisplayUITest.php

File

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

Class

ExtraFieldBrowserTestBase
Base class for Extra Field browser tests.

Namespace

Drupal\Tests\extra_field\Functional

Code

public function setupContentEntityDisplay($contentType) {
  $this->contentTypeName = $contentType;
  $this
    ->createContentType([
    'type' => $contentType,
  ]);
  EntityViewDisplay::create([
    'targetEntityType' => 'node',
    'bundle' => $contentType,
    'mode' => 'default',
    'status' => TRUE,
  ]);
}