You are here

protected function BlockVisibilityGroupsTestBase::placeBlockInGroup in Block Visibility Groups 8

Parameters

$plugin_id:

$group_id:

array $settings:

Return value

\Drupal\block\Entity\Block

1 call to BlockVisibilityGroupsTestBase::placeBlockInGroup()
VisibilityTest::testSingleConditions in src/Tests/VisibilityTest.php

File

src/Tests/BlockVisibilityGroupsTestBase.php, line 42

Class

BlockVisibilityGroupsTestBase

Namespace

Drupal\block_visibility_groups\Tests

Code

protected function placeBlockInGroup($plugin_id, $group_id, $settings = []) {
  $settings['label_display'] = 'visible';
  $settings['label'] = $this
    ->randomMachineName();
  $settings['visibility']['condition_group']['block_visibility_group'] = $group_id;
  $block = $this
    ->drupalPlaceBlock($plugin_id, $settings);
  return $block;
}