Loading core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php +2 −1 Original line number Diff line number Diff line 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; Loading Loading @@ -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()) Loading Loading
core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php +2 −1 Original line number Diff line number Diff line 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; Loading Loading @@ -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()) Loading