class EntityNotExistsValidatorTest extends TestCase
{ use IntegrationTestBehaviour;
public function testCriteriaObjectIsNotModified(): void
{ $criteria =
new Criteria();
$criteria->
setLimit(50
);
$context = Context::
createDefaultContext();
$constraint =
new EntityNotExists( ['context' =>
$context, 'entity' => LocaleDefinition::ENTITY_NAME, 'criteria' =>
$criteria] );
$validator =
$this->
getValidator();
$validator->
validate(Uuid::
randomHex(),
$constraint);
static::
assertCount(0,
$criteria->
getFilters());
static::
assertSame(50,
$criteria->
getLimit());
}