
| Current Path : /var/www/html/dataninja.cn/core/modules/comment/tests/src/Functional/Views/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/dataninja.cn/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php |
<?php
namespace Drupal\Tests\comment\Functional\Views;
/**
* Tests comments on nodes.
*
* @group comment
*/
class NodeCommentsTest extends CommentTestBase {
/**
* Modules to install.
*
* @var array
*/
public static $modules = ['history'];
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = ['test_new_comments'];
/**
* Test the new comments field plugin.
*/
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.');
}
}