diff core/modules/user/tests/src/Unit/UserAuthTest.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/user/tests/src/Unit/UserAuthTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/user/tests/src/Unit/UserAuthTest.php	Thu May 09 15:34:47 2019 +0100
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\user\Unit;
 
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Drupal\user\UserAuth;
 
@@ -59,8 +60,9 @@
   protected function setUp() {
     $this->userStorage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
 
-    $entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
-    $entity_manager->expects($this->any())
+    /** @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject $entity_type_manager */
+    $entity_type_manager = $this->createMock(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->any())
       ->method('getStorage')
       ->with('user')
       ->will($this->returnValue($this->userStorage));
@@ -72,7 +74,7 @@
       ->setMethods(['id', 'setPassword', 'save', 'getPassword'])
       ->getMock();
 
-    $this->userAuth = new UserAuth($entity_manager, $this->passwordService);
+    $this->userAuth = new UserAuth($entity_type_manager, $this->passwordService);
   }
 
   /**