Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / comment / tests / src / Unit / Entity / CommentLockTest.php
index 9dbe6d36eba7d7786980dccbc7233cc097f0a3f5..1289a8e8c679988bbfae559d8debc9af2b6c2a94 100644 (file)
@@ -69,6 +69,14 @@ class CommentLockTest extends UnitTestCase {
       ->method('getThread')
       ->will($this->returnValue(''));
 
+    $anon_user = $this->getMock('Drupal\Core\Session\AccountInterface');
+    $anon_user->expects($this->any())
+      ->method('isAnonymous')
+      ->will($this->returnValue(TRUE));
+    $comment->expects($this->any())
+      ->method('getOwner')
+      ->will($this->returnValue($anon_user));
+
     $parent_entity = $this->getMock('\Drupal\Core\Entity\ContentEntityInterface');
     $parent_entity->expects($this->atLeastOnce())
       ->method('getCacheTagsToInvalidate')