'groups' => 'Group',
]));
$violations =
$this->
validate($entity,
new Valid(), 'Group'
);
/* @var ConstraintViolationInterface[] $violations */
$this->
assertCount(0,
$violations);
} public function testTypedReferenceCascadeEnabled() { $entity =
new CascadingEntity();
$entity->requiredChild =
new CascadedChild();
$callback =
function D
$value, ExecutionContextInterface
$context) { $context->
buildViolation('Invalid child'
) ->
atPath('name'
) ->
addViolation() ;
};
$cascadingMetadata =
new ClassMetadata(CascadingEntity::
class);
$cascadingMetadata->
addConstraint(new Cascade());