function BlockInvalidRegionTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/block/tests/src/Functional/BlockInvalidRegionTest.php, line 30

Class

BlockInvalidRegionTest
Tests that blocks assigned to invalid regions are disabled with a warning.

Namespace

Drupal\Tests\block\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create an admin user.
    $admin_user = $this->drupalCreateUser([
        'administer site configuration',
        'access administration pages',
        'administer blocks',
    ]);
    $this->drupalLogin($admin_user);
}

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