function BlockHiddenRegionTest::setUp

Same name in other branches
  1. 9 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 32

Class

BlockHiddenRegionTest
Tests that a newly installed theme does not inherit blocks to its hidden regions.

Namespace

Drupal\Tests\block\Functional

Code

protected function setUp() {
    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.