$em->
getClassMetadata(SingleIntIdStringWrapperNameEntity::
class),
]);
} /**
* This is a functional test as there is a large integration necessary to get the validator working.
*
* @dataProvider provideUniquenessConstraints
*/
public function testValidateUniqueness(UniqueEntity
$constraint) { $entity1 =
new SingleIntIdEntity(1, 'Foo'
);
$entity2 =
new SingleIntIdEntity(2, 'Foo'
);
$this->validator->
validate($entity1,
$constraint);
$this->
assertNoViolation();
$this->em->
persist($entity1);
$this->em->
flush();
$this->validator->
validate($entity1,
$constraint);