NodeCommentsTest.php in Zircon Profile 8.0
File
core/modules/comment/src/Tests/Views/NodeCommentsTest.php
View source
<?php
namespace Drupal\comment\Tests\Views;
class NodeCommentsTest extends CommentTestBase {
public static $modules = [
'history',
];
public static $testViews = [
'test_new_comments',
];
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.');
}
}