diff --git a/core/modules/comment/src/Tests/CommentTitleTest.php b/core/modules/comment/src/Tests/CommentTitleTest.php index a2e939f..598c410 100644 --- a/core/modules/comment/src/Tests/CommentTitleTest.php +++ b/core/modules/comment/src/Tests/CommentTitleTest.php @@ -2,21 +2,19 @@ /** * @file - * Definition of Drupal\comment\Tests\CommentTitleTest. + * Contains \Drupal\comment\Tests\CommentTitleTest. */ namespace Drupal\comment\Tests; -use Drupal\Core\Language\Language; - /** - * Tests comment with empty titles. + * Tests comment titles. */ class CommentTitleTest extends CommentTestBase { public static function getInfo() { return array( 'name' => 'Comment titles', - 'description' => 'Test to ensure that appropriate and accessible markup is created to titles.', + 'description' => 'Test to ensure that appropriate and accessible markup is created for comment titles.', 'group' => 'Comment', ); } @@ -25,8 +23,8 @@ public static function getInfo() { * Tests markup for comments with empty titles. */ public function testCommentEmptyTitles() { - // Enables module that sets comments to = ''. - \Drupal::moduleHandler()->install(array('comment_test_empty_titles')); + // Enables module that sets comments to an empty string. + \Drupal::moduleHandler()->install(array('comment_empty_titles_test')); // Set comments to have a subject with preview disabled. $this->drupalLogin($this->admin_user); @@ -39,8 +37,7 @@ public function testCommentEmptyTitles() { $this->drupalLogin($this->web_user); $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->id())); - // Post comment #1 and verify that title is rendered in h3. - $this->drupalLogin($this->web_user); + // Post comment #1 and verify that h3's are not rendered. $subject_text = $this->randomName(); $comment_text = $this->randomName(); $comment = $this->postComment($this->node, $comment_text, $subject_text, TRUE); @@ -50,11 +47,11 @@ public function testCommentEmptyTitles() { $regex .= '/s'; $this->assertPattern($regex, 'Comment is created succesfully'); // Tests that markup is not generated for the comment without header. - $this->assertNoPattern('|