You are here

protected function BreadcrumbTest::setUp in Drupal 10

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

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php, line 49

Class

BreadcrumbTest
Tests breadcrumbs functionality.

Namespace

Drupal\Tests\system\Functional\Menu

Code

protected function setUp() : void {
  parent::setUp();
  $perms = array_keys(\Drupal::service('user.permissions')
    ->getPermissions());
  $this->adminUser = $this
    ->drupalCreateUser($perms);
  $this
    ->drupalLogin($this->adminUser);

  // This test puts menu links in the Tools menu and then tests for their
  // presence on the page, so we need to ensure that the Tools block will be
  // displayed in the admin theme and olivero.
  $this
    ->drupalPlaceBlock('system_menu_block:tools', [
    'region' => 'content',
    'theme' => $this
      ->config('system.theme')
      ->get('admin'),
  ]);
  $this
    ->drupalPlaceBlock('system_menu_block:tools', [
    'region' => 'content',
    'theme' => 'olivero',
  ]);
}