public function CommentInterfaceTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Tests/CommentInterfaceTest.php \Drupal\comment\Tests\CommentInterfaceTest::setUp()
Set up comments to have subject and preview disabled.
Overrides CommentTestBase::setUp
File
- core/
modules/ comment/ src/ Tests/ CommentInterfaceTest.php, line 26 - Contains \Drupal\comment\Tests\CommentInterfaceTest.
Class
- CommentInterfaceTest
- Tests comment user interfaces.
Namespace
Drupal\comment\TestsCode
public function setUp() {
parent::setUp();
$this
->drupalLogin($this->adminUser);
// Make sure that comment field title is not displayed when there's no
// comments posted.
$this
->drupalGet($this->node
->urlInfo());
$this
->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments title is not displayed.');
// Set comments to have subject and preview disabled.
$this
->setCommentPreview(DRUPAL_DISABLED);
$this
->setCommentForm(TRUE);
$this
->setCommentSubject(FALSE);
$this
->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.');
$this
->drupalLogout();
}