function NodeAccessMenuLinkTest::setUp

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

Overrides NodeTestBase::setUp

File

core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php, line 36

Class

NodeAccessMenuLinkTest
Tests the interaction of the node access system with menu links.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('system_menu_block:main');
    $this->contentAdminUser = $this->drupalCreateUser([
        'access content',
        'administer content types',
        'bypass node access',
        'administer menu',
    ]);
    $this->config('user.role.' . RoleInterface::ANONYMOUS_ID)
        ->set('permissions', [])
        ->save();
}

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