public function NodeCommentsTest::testNewComments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Tests/Views/NodeCommentsTest.php \Drupal\comment\Tests\Views\NodeCommentsTest::testNewComments()
Test the new comments field plugin.
File
- core/
modules/ comment/ src/ Tests/ Views/ NodeCommentsTest.php, line 34 - Contains \Drupal\comment\Tests\Views\NodeCommentsTest.
Class
- NodeCommentsTest
- Tests comments on nodes.
Namespace
Drupal\comment\Tests\ViewsCode
public function testNewComments() {
$this
->drupalGet('test-new-comments');
$this
->assertResponse(200);
$new_comments = $this
->cssSelect(".views-field-new-comments a:contains('1')");
$this
->assertEqual(count($new_comments), 1, 'Found the number of new comments for a certain node.');
}