Loading core/modules/comment/tests/src/Functional/CommentAdminTest.php +0 −4 Original line number Diff line number Diff line Loading @@ -133,10 +133,8 @@ public function testApprovalNodeInterface() { 'post comments' => TRUE, 'skip comment approval' => FALSE, ]); $this->drupalLogin($this->adminUser); // Ensure that doesn't require contact info. $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MAYNOT_CONTACT); $this->drupalLogout(); // Post anonymous comment without contact info. $subject = $this->randomMachineName(); Loading Loading @@ -219,10 +217,8 @@ public function testEditComment() { $this->drupalLogout(); // Post anonymous comment. $this->drupalLogin($this->adminUser); // Ensure that we need email id before posting comment. $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MUST_CONTACT); $this->drupalLogout(); // Post comment with contact info (required). $author_name = $this->randomMachineName(); Loading core/modules/comment/tests/src/Functional/CommentAnonymousTest.php +0 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ protected function setUp(): void { * Tests anonymous comment functionality. */ public function testAnonymous() { $this->drupalLogin($this->adminUser); $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MAYNOT_CONTACT); $this->drupalLogout(); // Preview comments (with `skip comment approval` permission). $edit = []; Loading Loading @@ -118,9 +116,7 @@ public function testAnonymous() { $this->assertSession()->pageTextContains('The name you used (' . $this->adminUser->getAccountName() . ') belongs to a registered user.'); // Require contact info. $this->drupalLogin($this->adminUser); $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MUST_CONTACT); $this->drupalLogout(); // Try to post comment with contact info (required). $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); Loading core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +0 −7 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ class CommentInterfaceTest extends CommentTestBase { */ protected function setUp(): void { 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->toUrl()); Loading @@ -39,7 +38,6 @@ protected function setUp(): void { $this->setCommentForm(TRUE); $this->setCommentSubject(FALSE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); } /** Loading @@ -63,10 +61,8 @@ public function testCommentInterface() { // Set comments to have subject and preview to required. $this->drupalLogout(); $this->drupalLogin($this->adminUser); $this->setCommentSubject(TRUE); $this->setCommentPreview(DRUPAL_REQUIRED); $this->drupalLogout(); // Create comment #2 that allows subject and requires preview. $this->drupalLogin($this->webUser); Loading Loading @@ -208,9 +204,7 @@ public function testCommentInterface() { $this->assertFalse($this->commentExists($reply, TRUE), 'Reply not found.'); // Enabled comment form on node page. $this->drupalLogin($this->adminUser); $this->setCommentForm(TRUE); $this->drupalLogout(); // Submit comment through node form. $this->drupalLogin($this->webUser); Loading @@ -220,7 +214,6 @@ public function testCommentInterface() { // Disable comment form on node page. $this->drupalLogout(); $this->drupalLogin($this->adminUser); $this->setCommentForm(FALSE); } Loading core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php +0 −2 Original line number Diff line number Diff line Loading @@ -53,12 +53,10 @@ protected function setUp(): void { */ public function testThreadedCommentView() { // Set comments to have subject required and preview disabled. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_DISABLED); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Post comment. $this->drupalLogin($this->webUser); Loading core/modules/comment/tests/src/Functional/CommentPreviewTest.php +0 −6 Original line number Diff line number Diff line Loading @@ -35,13 +35,10 @@ class CommentPreviewTest extends CommentTestBase { * Tests comment preview. */ public function testCommentPreview() { // As admin user, configure comment settings. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_OPTIONAL); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Log in as web user. $this->drupalLogin($this->webUser); Loading Loading @@ -94,13 +91,10 @@ public function testCommentPreview() { * Tests comment preview. */ public function testCommentPreviewDuplicateSubmission() { // As admin user, configure comment settings. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_OPTIONAL); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Log in as web user. $this->drupalLogin($this->webUser); Loading Loading
core/modules/comment/tests/src/Functional/CommentAdminTest.php +0 −4 Original line number Diff line number Diff line Loading @@ -133,10 +133,8 @@ public function testApprovalNodeInterface() { 'post comments' => TRUE, 'skip comment approval' => FALSE, ]); $this->drupalLogin($this->adminUser); // Ensure that doesn't require contact info. $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MAYNOT_CONTACT); $this->drupalLogout(); // Post anonymous comment without contact info. $subject = $this->randomMachineName(); Loading Loading @@ -219,10 +217,8 @@ public function testEditComment() { $this->drupalLogout(); // Post anonymous comment. $this->drupalLogin($this->adminUser); // Ensure that we need email id before posting comment. $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MUST_CONTACT); $this->drupalLogout(); // Post comment with contact info (required). $author_name = $this->randomMachineName(); Loading
core/modules/comment/tests/src/Functional/CommentAnonymousTest.php +0 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ protected function setUp(): void { * Tests anonymous comment functionality. */ public function testAnonymous() { $this->drupalLogin($this->adminUser); $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MAYNOT_CONTACT); $this->drupalLogout(); // Preview comments (with `skip comment approval` permission). $edit = []; Loading Loading @@ -118,9 +116,7 @@ public function testAnonymous() { $this->assertSession()->pageTextContains('The name you used (' . $this->adminUser->getAccountName() . ') belongs to a registered user.'); // Require contact info. $this->drupalLogin($this->adminUser); $this->setCommentAnonymous(CommentInterface::ANONYMOUS_MUST_CONTACT); $this->drupalLogout(); // Try to post comment with contact info (required). $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); Loading
core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +0 −7 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ class CommentInterfaceTest extends CommentTestBase { */ protected function setUp(): void { 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->toUrl()); Loading @@ -39,7 +38,6 @@ protected function setUp(): void { $this->setCommentForm(TRUE); $this->setCommentSubject(FALSE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); } /** Loading @@ -63,10 +61,8 @@ public function testCommentInterface() { // Set comments to have subject and preview to required. $this->drupalLogout(); $this->drupalLogin($this->adminUser); $this->setCommentSubject(TRUE); $this->setCommentPreview(DRUPAL_REQUIRED); $this->drupalLogout(); // Create comment #2 that allows subject and requires preview. $this->drupalLogin($this->webUser); Loading Loading @@ -208,9 +204,7 @@ public function testCommentInterface() { $this->assertFalse($this->commentExists($reply, TRUE), 'Reply not found.'); // Enabled comment form on node page. $this->drupalLogin($this->adminUser); $this->setCommentForm(TRUE); $this->drupalLogout(); // Submit comment through node form. $this->drupalLogin($this->webUser); Loading @@ -220,7 +214,6 @@ public function testCommentInterface() { // Disable comment form on node page. $this->drupalLogout(); $this->drupalLogin($this->adminUser); $this->setCommentForm(FALSE); } Loading
core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php +0 −2 Original line number Diff line number Diff line Loading @@ -53,12 +53,10 @@ protected function setUp(): void { */ public function testThreadedCommentView() { // Set comments to have subject required and preview disabled. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_DISABLED); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Post comment. $this->drupalLogin($this->webUser); Loading
core/modules/comment/tests/src/Functional/CommentPreviewTest.php +0 −6 Original line number Diff line number Diff line Loading @@ -35,13 +35,10 @@ class CommentPreviewTest extends CommentTestBase { * Tests comment preview. */ public function testCommentPreview() { // As admin user, configure comment settings. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_OPTIONAL); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Log in as web user. $this->drupalLogin($this->webUser); Loading Loading @@ -94,13 +91,10 @@ public function testCommentPreview() { * Tests comment preview. */ public function testCommentPreviewDuplicateSubmission() { // As admin user, configure comment settings. $this->drupalLogin($this->adminUser); $this->setCommentPreview(DRUPAL_OPTIONAL); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); $this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); $this->drupalLogout(); // Log in as web user. $this->drupalLogin($this->webUser); Loading