X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FUnit%2FEntity%2FCommentLockTest.php;h=1289a8e8c679988bbfae559d8debc9af2b6c2a94;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=9dbe6d36eba7d7786980dccbc7233cc097f0a3f5;hpb=bfbba508964731508b9bd6d5835c2edc858db95b;p=yaffs-website diff --git a/web/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php b/web/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php index 9dbe6d36e..1289a8e8c 100644 --- a/web/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php +++ b/web/core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php @@ -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')