3 namespace Drupal\comment\Tests\Views;
6 * Tests comments on nodes.
10 class NodeCommentsTest extends CommentTestBase {
17 public static $modules = ['history'];
20 * Views used by this test.
24 public static $testViews = ['test_new_comments'];
27 * Test the new comments field plugin.
29 public function testNewComments() {
30 $this->drupalGet('test-new-comments');
31 $this->assertResponse(200);
32 $new_comments = $this->cssSelect(".views-field-new-comments a:contains('1')");
33 $this->assertEqual(count($new_comments), 1, 'Found the number of new comments for a certain node.');