You are here

protected function ParagraphsFeaturesJavascriptTestBase::setUp in Paragraphs Features 8

Same name and namespace in other branches
  1. 2.x tests/src/FunctionalJavascript/ParagraphsFeaturesJavascriptTestBase.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesJavascriptTestBase::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/ParagraphsFeaturesJavascriptTestBase.php, line 52

Class

ParagraphsFeaturesJavascriptTestBase
Base class for Javascript tests for paragraphs features module.

Namespace

Drupal\Tests\paragraphs_features\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  if ($theme = getenv('THEME')) {
    $this
      ->assertTrue(\Drupal::service('theme_installer')
      ->install([
      $theme,
    ]));
    $this->container
      ->get('config.factory')
      ->getEditable('system.theme')
      ->set('default', $theme)
      ->set('admin', $theme)
      ->save();
  }

  // Place the breadcrumb, tested in fieldUIAddNewField().
  $this
    ->drupalPlaceBlock('system_breadcrumb_block');
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $this
    ->drupalPlaceBlock('local_actions_block');
  $this
    ->drupalPlaceBlock('page_title_block');
}