b0ee3156290d77be367e6990b829855f7b0e27b4
[yaffs-website] / web / core / modules / comment / src / Tests / Views / NodeCommentsTest.php
1 <?php
2
3 namespace Drupal\comment\Tests\Views;
4
5 /**
6  * Tests comments on nodes.
7  *
8  * @group comment
9  */
10 class NodeCommentsTest extends CommentTestBase {
11
12   /**
13    * Modules to install.
14    *
15    * @var array
16    */
17   public static $modules = ['history'];
18
19   /**
20    * Views used by this test.
21    *
22    * @var array
23    */
24   public static $testViews = ['test_new_comments'];
25
26   /**
27    * Test the new comments field plugin.
28    */
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.');
34   }
35
36 }