protected function CommentNotifyTestBase::setUp in Comment Notify 8
Test that the config page is working.
Overrides BrowserTestBase::setUp
2 calls to CommentNotifyTestBase::setUp()
- CommentNotifyAnonymousTest::setUp in tests/
src/ Functional/ CommentNotifyAnonymousTest.php - Test that the config page is working.
- CommentNotifyUserPreferencesTest::setUp in tests/
src/ Functional/ CommentNotifyUserPreferencesTest.php - Test that the config page is working.
2 methods override CommentNotifyTestBase::setUp()
- CommentNotifyAnonymousTest::setUp in tests/
src/ Functional/ CommentNotifyAnonymousTest.php - Test that the config page is working.
- CommentNotifyUserPreferencesTest::setUp in tests/
src/ Functional/ CommentNotifyUserPreferencesTest.php - Test that the config page is working.
File
- tests/
src/ Functional/ CommentNotifyTestBase.php, line 46
Class
- CommentNotifyTestBase
- Comment notify Base Test class.
Namespace
Drupal\Tests\comment_notify\FunctionalCode
protected function setUp() {
parent::setUp();
// Create and login administrative user.
$this->adminUser = $this
->drupalCreateUser([
'administer comment notify',
'administer permissions',
'administer comments',
]);
// Enable comment notify on this node and allow anonymous information in
// comments.
$this
->drupalCreateContentType([
'type' => 'article',
]);
$this
->addDefaultCommentField('node', 'article');
$comment_field = FieldConfig::loadByName('node', 'article', 'comment');
$comment_field
->setSetting('anonymous', CommentInterface::ANONYMOUS_MAY_CONTACT);
$comment_field
->save();
}