You are here

protected function NodeAccessPagerTest::setUp in Drupal 9

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

Overrides BrowserTestBase::setUp

File

core/modules/node/tests/src/Functional/NodeAccessPagerTest.php, line 31

Class

NodeAccessPagerTest
Tests access controlled node views have the right amount of comment pages.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
  parent::setUp();
  node_access_rebuild();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => t('Basic page'),
  ]);
  $this
    ->addDefaultCommentField('node', 'page');
  $this->webUser = $this
    ->drupalCreateUser([
    'access content',
    'access comments',
    'node test view',
  ]);
}