function CommentStatusFieldAccessTest::setUp
Overrides BrowserTestBase::setUp
File
- 
              core/
modules/ comment/ tests/ src/ Functional/ CommentStatusFieldAccessTest.php, line 58  
Class
- CommentStatusFieldAccessTest
 - Tests comment status field access.
 
Namespace
Drupal\Tests\comment\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  $node_type = NodeType::create([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $node_type->save();
  $this->nodeAuthor = $this->drupalCreateUser([
    'create article content',
    'skip comment approval',
    'post comments',
    'edit own comments',
    'access comments',
    'administer nodes',
  ]);
  $this->commentAdmin = $this->drupalCreateUser([
    'administer comments',
    'create article content',
    'edit own comments',
    'skip comment approval',
    'post comments',
    'access comments',
    'administer nodes',
  ]);
  $this->addDefaultCommentField('node', 'article');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.