diff -u b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php --- b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php +++ b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php @@ -68,8 +68,8 @@ // Check that the preview is displaying the title and body. $this->assertTitle('Preview comment | Drupal'); - $this->assertText($edit['subject[0][value]']); - $this->assertText($edit['comment_body[0][value]']); + $this->assertText($edit['subject[0][value]'], 'Subject displayed.'); + $this->assertText($edit['comment_body[0][value]'], 'Comment displayed.'); // Check that the title and body fields are displayed with the correct values. $this->assertFieldByName('subject[0][value]', $edit['subject[0][value]'], 'Subject field displayed.'); @@ -102,8 +102,8 @@ // Check that the preview is displaying the title and body. $this->assertTitle('Preview comment | Drupal'); - $this->assertText($edit['subject[0][value]']); - $this->assertText($edit['comment_body[0][value]']); + $this->assertText($edit['subject[0][value]'], 'Subject displayed.'); + $this->assertText($edit['comment_body[0][value]'], 'Comment displayed.'); // Check that the title and body fields are displayed with the correct values. $this->assertFieldByName('subject[0][value]', $edit['subject[0][value]'], 'Subject field displayed.'); @@ -151,10 +151,10 @@ // Check that the preview is displaying the subject, comment, author and date correctly. $this->assertTitle('Preview comment | Drupal'); - $this->assertText($edit['subject[0][value]']); - $this->assertText($edit['comment_body[0][value]']); - $this->assertText($web_user->getAccountName()); - $this->assertText($expected_text_date); + $this->assertText($edit['subject[0][value]'], 'Subject displayed.'); + $this->assertText($edit['comment_body[0][value]'], 'Comment displayed.'); + $this->assertText($web_user->getAccountName(), 'Author displayed.'); + $this->assertText($expected_text_date, 'Date displayed.'); // Check that the subject, comment, author and date fields are displayed with the correct values. $this->assertFieldByName('subject[0][value]', $edit['subject[0][value]'], 'Subject field displayed.'); diff -u b/core/modules/search/tests/src/Functional/SearchPageTextTest.php b/core/modules/search/tests/src/Functional/SearchPageTextTest.php --- b/core/modules/search/tests/src/Functional/SearchPageTextTest.php +++ b/core/modules/search/tests/src/Functional/SearchPageTextTest.php @@ -77,7 +77,6 @@ $this->assertText('search yielded no results'); $this->assertText(t('Search')); $title_source = 'Search for @keywords | Drupal'; - $title_source = 'Search for '.Unicode::truncate($search_terms, 60, TRUE, TRUE).' | Drupal'; $this->assertTitle('Search for ' . Unicode::truncate($search_terms, 60, TRUE, TRUE) . ' | Drupal'); $this->assertNoText('Node', 'Erroneous tab and breadcrumb text is not present'); $this->assertNoText(t('Node'), 'Erroneous translated tab and breadcrumb text is not present');