protected function CommentThreadingTest::assertNoParentLink in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Functional/CommentThreadingTest.php \Drupal\Tests\comment\Functional\CommentThreadingTest::assertNoParentLink()
- 9 core/modules/comment/tests/src/Functional/CommentThreadingTest.php \Drupal\Tests\comment\Functional\CommentThreadingTest::assertNoParentLink()
Asserts that the specified comment does not have a link to a parent.
@internal
Parameters
int $cid: The comment ID to check.
File
- core/
modules/ comment/ tests/ src/ Functional/ CommentThreadingTest.php, line 166
Class
- CommentThreadingTest
- Tests to make sure the comment number increments properly.
Namespace
Drupal\Tests\comment\FunctionalCode
protected function assertNoParentLink(int $cid) : void {
$pattern = "//article[@id='comment-{$cid}']";
// A parent link is always accompanied by the text "In reply to".
$this
->assertSession()
->elementTextNotContains('xpath', $pattern, 'In reply to');
}