Verified Commit 3bc7d53d 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

(cherry picked from commit 5433842c)
parent 410f4807
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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())