function TrackerNodeAccessTest::setUp

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

Overrides BrowserTestBase::setUp

File

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

Class

TrackerNodeAccessTest
Tests for private node access on /tracker.

Namespace

Drupal\Tests\tracker\Functional

Code

protected function setUp() {
    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);
}

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