protected function CommentStatusFieldAccessTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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' => t('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');
}