diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php index 28785fc..e10a008 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php @@ -134,11 +134,10 @@ function testAnonymous() { $this->assertNoPattern('@]*>Comments@', 'Comments were not displayed.'); $this->assertNoLink('Add new comment', 'Link to add comment was found.'); - // Attempt to view node-comment form while disallowed. + // Attempt to get redirected to node, if authenticated user has no + // permission to use it. $this->drupalGet('comment/reply/' . $this->node->id()); - $this->assertText('You are not authorized to post comments', 'Error attempting to post comment.'); - $this->assertNoFieldByName('subject', '', 'Subject field not found.'); - $this->assertNoFieldByName('comment_body[0][value]', '', 'Comment field not found.'); + $this->assertUrl('node/' . $this->node->id()); user_role_change_permissions(DRUPAL_ANONYMOUS_RID, array( 'access comments' => TRUE,