function CommentsHistoryTest::testNewComments
Tests the new comments field plugin.
File
-
core/
modules/ history/ tests/ src/ Functional/ CommentsHistoryTest.php, line 43
Class
- CommentsHistoryTest
- Tests comments history.
Namespace
Drupal\Tests\history\FunctionalCode
public function testNewComments() : void {
$this->drupalGet('test-new-comments');
$this->assertSession()
->statusCodeEquals(200);
$new_comments = $this->cssSelect(".views-field-new-comments a:contains('1')");
$this->assertCount(1, $new_comments, 'Found the number of new comments for a certain node.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.