function NavigationTopBarPageContextTest::setUp

Overrides BrowserTestBase::setUp

File

core/modules/navigation/tests/src/Functional/NavigationTopBarPageContextTest.php, line 48

Class

NavigationTopBarPageContextTest
Tests the PageContext top bar item functionality.

Namespace

Drupal\Tests\navigation\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create and log in an administrative user.
    $this->adminUser = $this->drupalCreateUser([
        'access navigation',
        'bypass node access',
    ]);
    $this->drupalLogin($this->adminUser);
    // Ensure the 'article' content type exists.
    $this->createContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
}

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