diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentBookTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentBookTest.php index 259e746..4d92e9d 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentBookTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentBookTest.php @@ -7,6 +7,7 @@ namespace Drupal\comment\Tests; +use Drupal\comment\CommentInterface; use Drupal\simpletest\WebTestBase; /** @@ -55,7 +56,8 @@ public function testBookCommentPrint() { 'comment_body' => $comment_body, 'entity_id' => $book_node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', + 'status' => CommentInterface::PUBLISHED, )); $comment->save(); @@ -63,6 +65,9 @@ public function testBookCommentPrint() { $this->drupalLogin($commenting_user); $this->drupalGet('node/' . $book_node->id()); + + $this->assertText($comment_subject, 'Comment subject found'); + $this->assertText($comment_body, 'Comment body found'); $this->assertText(t('Add new comment'), 'Comment form found'); $this->assertField('subject', 'Comment form subject found');