Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / comment / tests / src / Functional / Views / NodeCommentsTest.php
diff --git a/web/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php b/web/core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php
new file mode 100644 (file)
index 0000000..e2c5d15
--- /dev/null
@@ -0,0 +1,36 @@
+<?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.');
+  }
+
+}