function MenuUiTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/menu_ui/tests/src/Functional/MenuUiTest.php, line 88

Class

MenuUiTest
Tests the menu UI.

Namespace

Drupal\Tests\menu_ui\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('page_title_block');
    $this->drupalPlaceBlock('system_menu_block:main');
    $this->drupalPlaceBlock('local_actions_block', [
        'region' => 'content',
        'weight' => -100,
    ]);
    $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
    // Create users.
    $this->adminUser = $this->drupalCreateUser([
        'access administration pages',
        'administer blocks',
        'administer menu',
        'create article content',
    ]);
    $this->authenticatedUser = $this->drupalCreateUser([]);
}

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