You are here

protected function LayoutBuilderIntegrationTest::setUp in Core Context 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/LayoutBuilderIntegrationTest.php, line 36

Class

LayoutBuilderIntegrationTest
@group core_context

Namespace

Drupal\Tests\core_context\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $storage = FieldStorageConfig::create([
    'entity_type' => 'node',
    'field_name' => 'context',
    'type' => 'context',
    'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
  ]);
  $storage
    ->save();
  FieldConfig::create([
    'field_storage' => $storage,
    'bundle' => 'page',
  ])
    ->save();
}