function ToolbarClaroOverridesTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php \Drupal\Tests\system\Functional\Theme\ToolbarClaroOverridesTest::setUp()
  2. 10 core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php \Drupal\Tests\system\Functional\Theme\ToolbarClaroOverridesTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php, line 44

Class

ToolbarClaroOverridesTest
Tests the loading of Claro assets on a non-Claro default theme.

Namespace

Drupal\Tests\system\Functional\Theme

Code

protected function setUp() : void {
    parent::setUp();
    $this->themeInstaller = $this->container
        ->get('theme_installer');
    $this->themeManager = $this->container
        ->get('theme.manager');
    $this->themeInstaller
        ->install([
        'claro',
    ]);
    // Create user with sufficient permissions to have the shortcut toolbar menu
    // be available.
    $this->drupalLogin($this->drupalCreateUser([
        'access toolbar',
        'access shortcuts',
        'administer shortcuts',
        'access content overview',
    ]));
}

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