Skip to content
Snippets Groups Projects
Verified Commit 5433842c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3298923 by andypost, Berdir: Fix...

Issue #3298923 by andypost, Berdir: Fix ProtectedUserFieldConstraintValidatorTest to not trigger deprecations on PHP 8.2
parent 3ccc7d07
No related branches found
No related tags found
Loading
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment