protected function BreadcrumbTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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\MenuCode
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.
$this
->drupalPlaceBlock('system_menu_block:tools', [
'region' => 'content',
'theme' => $this
->config('system.theme')
->get('admin'),
]);
}