You are here

protected function ForumNodeAccessTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php \Drupal\Tests\forum\Functional\ForumNodeAccessTest::setUp()
  2. 9 core/modules/forum/tests/src/Functional/ForumNodeAccessTest.php \Drupal\Tests\forum\Functional\ForumNodeAccessTest::setUp()

File

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

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);
}