function BlockHiddenRegionTest::setUp

Same name in other branches
  1. 8.9.x core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php \Drupal\Tests\block\Functional\BlockHiddenRegionTest::setUp()
  2. 10 core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php \Drupal\Tests\block\Functional\BlockHiddenRegionTest::setUp()
  3. 11.x core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php \Drupal\Tests\block\Functional\BlockHiddenRegionTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/block/tests/src/Functional/BlockHiddenRegionTest.php, line 34

Class

BlockHiddenRegionTest
Tests that blocks are not added to hidden regions on theme installation.

Namespace

Drupal\Tests\block\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create administrative user.
    $this->adminUser = $this->drupalCreateUser([
        'administer blocks',
        'administer themes',
        'search content',
    ]);
    $this->drupalLogin($this->adminUser);
    $this->drupalPlaceBlock('search_form_block');
    $this->drupalPlaceBlock('local_tasks_block');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.