Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / views / tests / src / Functional / DefaultViewsTest.php
index 0e5c8934421dcf62551564a464372dc446361dff..9e4c338ddc7480b3343c5d162040adba95d9db22 100644 (file)
@@ -100,6 +100,15 @@ class DefaultViewsTest extends ViewTestBase {
         'field_name' => 'comment'
       ];
       Comment::create($comment)->save();
+
+      $unpublished_comment = [
+        'uid' => $user->id(),
+        'status' => CommentInterface::NOT_PUBLISHED,
+        'entity_id' => $node->id(),
+        'entity_type' => 'node',
+        'field_name' => 'comment',
+      ];
+      Comment::create($unpublished_comment)->save();
     }
 
     // Some views, such as the "Who's Online" view, only return results if at
@@ -165,16 +174,19 @@ class DefaultViewsTest extends ViewTestBase {
     // Create additional nodes compared to the one in the setup method.
     // Create two nodes in the same month, and one in each following month.
     $node = [
-      'created' => 280299600, // Sun, 19 Nov 1978 05:00:00 GMT
+      // Sun, 19 Nov 1978 05:00:00 GMT.
+      'created' => 280299600,
     ];
     $this->drupalCreateNode($node);
     $this->drupalCreateNode($node);
     $node = [
-      'created' => 282891600, // Tue, 19 Dec 1978 05:00:00 GMT
+      // Tue, 19 Dec 1978 05:00:00 GMT.
+      'created' => 282891600,
     ];
     $this->drupalCreateNode($node);
     $node = [
-      'created' => 285570000, // Fri, 19 Jan 1979 05:00:00 GMT
+      // Fri, 19 Jan 1979 05:00:00 GMT.
+      'created' => 285570000,
     ];
     $this->drupalCreateNode($node);