diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php index d05ac030e919bf562396e5bef1df4e024bd44f93..6a6e9f0ec33e84d797dc782b417ebe04c9709602 100644 --- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php +++ b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\user\Unit\Plugin\Validation\Constraint; use Drupal\Tests\UnitTestCase; +use Drupal\user\Entity\User; use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint; use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator; use Symfony\Component\Validator\Context\ExecutionContextInterface; @@ -87,7 +88,7 @@ public function providerTestValidate() { // Case 3: Account flagged to skip protected user should be ignored. $field_definition = $this->createMock('Drupal\Core\Field\FieldDefinitionInterface'); - $account = $this->createMock('Drupal\user\UserInterface'); + $account = $this->createMock(User::class); $account->_skipProtectedUserFieldConstraint = TRUE; $items = $this->createMock('Drupal\Core\Field\FieldItemListInterface'); $items->expects($this->once())