function CommentStatusFieldAccessTest::setUp
Same name in other branches
- 8.9.x core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php \Drupal\Tests\comment\Functional\CommentStatusFieldAccessTest::setUp()
- 10 core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php \Drupal\Tests\comment\Functional\CommentStatusFieldAccessTest::setUp()
- 11.x core/modules/comment/tests/src/Functional/CommentStatusFieldAccessTest.php \Drupal\Tests\comment\Functional\CommentStatusFieldAccessTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentStatusFieldAccessTest.php, line 56
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.