function ForumNodeAccessTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php, line 40

Class

ForumNodeAccessTest
Tests forum block view for private node access.

Namespace

Drupal\Tests\forum\Functional

Code

protected function setUp() : void {
    parent::setUp();
    node_access_rebuild();
    node_access_test_add_field(NodeType::load('forum'));
    \Drupal::state()->set('node_access_test.private', TRUE);
}

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