diff --git a/core/modules/comment/tests/src/Functional/CommentTestBase.php b/core/modules/comment/tests/src/Functional/CommentTestBase.php index 71c46e6..4dca721 100644 --- a/core/modules/comment/tests/src/Functional/CommentTestBase.php +++ b/core/modules/comment/tests/src/Functional/CommentTestBase.php @@ -192,12 +192,12 @@ public function commentExists(CommentInterface $comment = NULL, $reply = FALSE) return FALSE; } - $comment_title = $comment_element->find('xpath', 'div/h3/a'); + $comment_title = $comment_element[0]->find('xpath', 'div/h3/a'); if (empty($comment_title) || $comment_title->getText() !== $comment->getSubject()) { return FALSE; } - $comment_body = $comment_element->find('xpath', 'div/div/p'); + $comment_body = $comment_element[0]->find('xpath', 'div/div/p'); if (empty($comment_body) || $comment_body->getText() !== $comment->comment_body->value) { return FALSE; } @@ -355,7 +355,7 @@ public function performCommentOperation(CommentInterface $comment, $operation, $ $this->drupalPostForm('admin/content/comment' . ($approval ? '/approval' : ''), $edit, t('Update')); if ($operation == 'delete') { - $this->drupalPostForm(NULL, [], t('Delete comments')); + $this->drupalPostForm(NULL, [], t('Delete')); $this->assertRaw(\Drupal::translation()->formatPlural(1, 'Deleted 1 comment.', 'Deleted @count comments.'), format_string('Operation "@operation" was performed on comment.', ['@operation' => $operation])); } else { diff --git a/core/modules/comment/tests/src/Functional/CommentTitleTest.php b/core/modules/comment/tests/src/Functional/CommentTitleTest.php index 1b43323..205c1ba 100644 --- a/core/modules/comment/tests/src/Functional/CommentTitleTest.php +++ b/core/modules/comment/tests/src/Functional/CommentTitleTest.php @@ -61,7 +61,7 @@ public function testCommentPopulatedTitles() { $this->assertPattern('|]*>]*>' . $subject_text . '|', 'Comment title is rendered in h3 when title populated.'); // Tests that the comment's title link is the permalink of the comment. $comment_permalink = $this->cssSelect('.permalink'); - $comment_permalink = $comment_permalink->getAttribute('href'); + $comment_permalink = $comment_permalink[0]->getAttribute('href'); // Tests that the comment's title link contains the url fragment. $this->assertTrue(strpos($comment_permalink, '#comment-' . $comment1->id()), "The comment's title link contains the url fragment."); $this->assertEqual($comment1->permalink()->toString(), $comment_permalink, "The comment's title has the correct link."); diff --git a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php index 32f5dfc..dabacc3 100644 --- a/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php +++ b/core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php @@ -31,7 +31,7 @@ class CommentFieldFilterTest extends CommentTestBase { */ public $commentTitles = []; - protected function setUp($import_test_views = true) { + protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); $this->drupalLogin($this->drupalCreateUser(['access comments'])); diff --git a/core/modules/comment/tests/src/Functional/Views/CommentFieldNameTest.php b/core/modules/comment/tests/src/Functional/Views/CommentFieldNameTest.php index 86c9437..a5e25be 100644 --- a/core/modules/comment/tests/src/Functional/Views/CommentFieldNameTest.php +++ b/core/modules/comment/tests/src/Functional/Views/CommentFieldNameTest.php @@ -39,7 +39,7 @@ class CommentFieldNameTest extends CommentTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = true) { + protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); $this->addDefaultCommentField('node', 'page', $this->fieldName); $this->customComment = Comment::create([ diff --git a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php index 070c70e..17e04b5 100644 --- a/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php +++ b/core/modules/comment/tests/src/Functional/Views/CommentRestExportTest.php @@ -24,7 +24,7 @@ class CommentRestExportTest extends CommentTestBase { */ public static $modules = ['node', 'comment', 'comment_test_views', 'rest', 'hal']; - protected function setUp($import_test_views = true) { + protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); // Add another anonymous comment. $comment = [ diff --git a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php index cd0766c..ca2d863 100644 --- a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php +++ b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php @@ -56,7 +56,7 @@ */ protected $comment; - protected function setUp($import_test_views = true) { + protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); ViewTestData::createTestViews(get_class($this), ['comment_test_views']); diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php index ed87ee8..c44f693 100644 --- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php +++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php @@ -59,7 +59,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase { */ public $node; - protected function setUp($import_test_views = true) { + protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); // Create a new content type diff --git a/core/modules/comment/tests/src/Functional/Views/RowRssTest.php b/core/modules/comment/tests/src/Functional/Views/RowRssTest.php index 39df6b3..7d61852 100644 --- a/core/modules/comment/tests/src/Functional/Views/RowRssTest.php +++ b/core/modules/comment/tests/src/Functional/Views/RowRssTest.php @@ -28,7 +28,7 @@ public function testRssRow() { $result = $this->getSession()->getDriver()->find('//item'); $this->assertEqual(count($result), 1, 'Just one comment was found in the rss output.'); - $this->assertEqual($result[0]->find('xpath','//pubDate')->getHtml(), gmdate('r', $this->comment->getCreatedTime()), 'The right pubDate appears in the rss output.'); + $this->assertEqual($result[0]->find('xpath', '//pubDate')->getHtml(), gmdate('r', $this->comment->getCreatedTime()), 'The right pubDate appears in the rss output.'); } }