Mercurial > hg > cmmr2012-drupal-site
diff core/modules/contact/tests/src/Unit/MailHandlerTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/modules/contact/tests/src/Unit/MailHandlerTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/contact/tests/src/Unit/MailHandlerTest.php Thu May 09 15:34:47 2019 +0100 @@ -5,6 +5,7 @@ use Drupal\contact\MailHandler; use Drupal\contact\MailHandlerException; use Drupal\contact\MessageInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; use Drupal\Tests\UnitTestCase; @@ -51,11 +52,11 @@ protected $contactForm; /** - * The entity manager service. + * The entity type manager. * - * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $entityManager; + protected $entityTypeManager; /** * The user storage handler. @@ -72,15 +73,15 @@ $this->mailManager = $this->getMock('\Drupal\Core\Mail\MailManagerInterface'); $this->languageManager = $this->getMock('\Drupal\Core\Language\LanguageManagerInterface'); $this->logger = $this->getMock('\Psr\Log\LoggerInterface'); - $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface'); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->userStorage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface'); - $this->entityManager->expects($this->any()) + $this->entityTypeManager->expects($this->any()) ->method('getStorage') ->with('user') ->willReturn($this->userStorage); $string_translation = $this->getStringTranslationStub(); - $this->contactMailHandler = new MailHandler($this->mailManager, $this->languageManager, $this->logger, $string_translation, $this->entityManager); + $this->contactMailHandler = new MailHandler($this->mailManager, $this->languageManager, $this->logger, $string_translation, $this->entityTypeManager); $language = new Language(['id' => 'en']); $this->languageManager->expects($this->any())