diff --git a/core/modules/comment/src/Tests/CommentAdminTest.php b/core/modules/comment/src/Tests/CommentAdminTest.php
index 3414ab6..d3068ca 100644
--- a/core/modules/comment/src/Tests/CommentAdminTest.php
+++ b/core/modules/comment/src/Tests/CommentAdminTest.php
@@ -168,4 +168,37 @@ public function testCommentAdmin() {
     // Rest from here on in is field_ui.
   }
 
+  /**
+   * Tests editing a comment as an admin.
+   */
+  public function testEditComment() {
+    // Enable anonymous user comments.
+    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
+      'access comments',
+      'post comments',
+      'skip comment approval',
+    ));
+
+    // Login as a web user.
+    $this->drupalLogin($this->webUser);
+    // Post a comment.
+    $comment = $this->postComment($this->node, $this->randomMachineName());
+
+    $this->drupalLogout();
+    // Post anonymous comment.
+    $anonymous_comment = $this->postComment($this->node, $this->randomMachineName());
+
+    // Login as an admin user.
+    $this->drupalLogin($this->adminUser);
+
+    // Make sure the comment field is not visible when
+    // the comment was posted by an authenticated user.
+    $this->drupalGet('comment/' . $comment->id() . '/edit');
+    $this->assertNoFieldById('edit-mail', $comment->getAuthorEmail());
+
+    // Make sure the comment field is visible when
+    // the comment was posted by an anonymous user.
+    $this->drupalGet('comment/' . $anonymous_comment->id() . '/edit');
+    $this->assertFieldById('edit-mail', $anonymous_comment->getAuthorEmail());
+  }
 }
