trait ParagraphsCoreVersionUiTestTrait

Provides helper methods for Drupal 8.3.x and 8.4.x versions.

Hierarchy

12 files declare their use of ParagraphsCoreVersionUiTestTrait
ParagraphsAddWidgetTest.php in paragraphs/tests/src/FunctionalJavascript/ParagraphsAddWidgetTest.php
ParagraphsClientsideButtonsClaroTest.php in paragraphs/tests/src/FunctionalJavascript/ParagraphsClientsideButtonsClaroTest.php
ParagraphsClientsideButtonsTest.php in paragraphs/tests/src/FunctionalJavascript/ParagraphsClientsideButtonsTest.php
ParagraphsContentModerationTest.php in paragraphs/modules/paragraphs_library/tests/src/FunctionalJavascript/ParagraphsContentModerationTest.php
ParagraphsContentModerationTranslationsTest.php in paragraphs/tests/src/Functional/WidgetStable/ParagraphsContentModerationTranslationsTest.php

... See full list

File

paragraphs/tests/src/Traits/ParagraphsCoreVersionUiTestTrait.php, line 8

Namespace

Drupal\Tests\paragraphs\Traits
View source
trait ParagraphsCoreVersionUiTestTrait {

  /**
   * Places commonly used blocks in a consistent order.
   */
  protected function placeDefaultBlocks() {

    // Place the system main block explicitly and first to have a consistent
    // block order before and after Drupal 9.4
    $this
      ->drupalPlaceBlock('system_main_block', [
      'weight' => -1,
      'region' => 'content',
    ]);

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

}

Members

Namesort descending Modifiers Type Description Overrides
ParagraphsCoreVersionUiTestTrait::placeDefaultBlocks protected function Places commonly used blocks in a consistent order. 1