You are here

protected function FieldDefaultsTestBase::setupMenus in Field Defaults 8

Set up menus and tasks in their regions.

Since menus and tasks are now blocks, we're required to explicitly set them to regions.

Note that subclasses must explicitly declare that the block module is a dependency.

1 call to FieldDefaultsTestBase::setupMenus()
FieldDefaultsTestBase::setUp in src/Tests/FieldDefaultsTestBase.php
Once installed, a content type with the desired field is created.

File

src/Tests/FieldDefaultsTestBase.php, line 74

Class

FieldDefaultsTestBase
Class FieldDefaultsTestBase.

Namespace

Drupal\field_defaults\Tests

Code

protected function setupMenus() {
  $this
    ->drupalPlaceBlock('system_menu_block:tools', [
    'region' => 'primary_menu',
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block', [
    'region' => 'secondary_menu',
  ]);
  $this
    ->drupalPlaceBlock('local_actions_block', [
    'region' => 'content',
  ]);
  $this
    ->drupalPlaceBlock('page_title_block', [
    'region' => 'content',
  ]);
}