function BlockSystemBrandingTest::setUp

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

Overrides BlockTestBase::setUp

File

core/modules/block/tests/src/Functional/BlockSystemBrandingTest.php, line 27

Class

BlockSystemBrandingTest
Tests branding block display.

Namespace

Drupal\Tests\block\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Set a site slogan.
    $this->config('system.site')
        ->set('slogan', 'Community plumbing')
        ->save();
    // Add the system branding block to the page.
    $this->drupalPlaceBlock('system_branding_block', [
        'region' => 'header',
        'id' => 'site-branding',
    ]);
}

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