Mercurial > hg > cmmr2012-drupal-site
diff core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php Thu May 09 15:34:47 2019 +0100 @@ -4,6 +4,7 @@ use Drupal\comment\CommentLinkBuilder; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Url; use Drupal\node\NodeInterface; use Drupal\Tests\Traits\Core\GeneratePermutationsTrait; @@ -32,11 +33,11 @@ protected $stringTranslation; /** - * The entity manager service. + * The entity type manager. * - * @var \Drupal\Core\Entity\EntityManagerInterface + * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $entityManager; + protected $entityTypeManager; /** * Module handler mock. @@ -70,10 +71,10 @@ protected function setUp() { $this->commentManager = $this->getMock('\Drupal\comment\CommentManagerInterface'); $this->stringTranslation = $this->getStringTranslationStub(); - $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface'); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface'); $this->currentUser = $this->getMock('\Drupal\Core\Session\AccountProxyInterface'); - $this->commentLinkBuilder = new CommentLinkBuilder($this->currentUser, $this->commentManager, $this->moduleHandler, $this->stringTranslation, $this->entityManager); + $this->commentLinkBuilder = new CommentLinkBuilder($this->currentUser, $this->commentManager, $this->moduleHandler, $this->stringTranslation, $this->entityTypeManager); $this->commentManager->expects($this->any()) ->method('getFields') ->with('node')