You are here

protected function TrackerNodeAccessTest::setUp in Drupal 10

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

File

core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php, line 36

Class

TrackerNodeAccessTest
Tests for private node access on /tracker.

Namespace

Drupal\Tests\tracker\Functional

Code

protected function setUp() : void {
  parent::setUp();
  node_access_rebuild();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
  ]);
  node_access_test_add_field(NodeType::load('page'));
  $this
    ->addDefaultCommentField('node', 'page', 'comment', CommentItemInterface::OPEN);
  \Drupal::state()
    ->set('node_access_test.private', TRUE);
}