public function testValidateInOtherGroupTraversesNoGroupSequence() {
$entity = new Entity();
$this->metadata
->addPropertyConstraint('firstName', new FailingConstraint(array(
'groups' => 'First',
)));
$this->metadata
->addGetterConstraint('lastName', new FailingConstraint(array(
'groups' => $this->metadata
->getDefaultGroup(),
)));
$this->metadata
->setGroupSequence(array(
'First',
$this->metadata
->getDefaultGroup(),
));
$this->visitor
->validate($entity, $this->metadata
->getDefaultGroup(), '');
// Only group "Second" was validated
$violations = new ConstraintViolationList(array(
new ConstraintViolation('Failed', 'Failed', array(), 'Root', 'lastName', ''),
));
$this
->assertEquals($violations, $this->visitor
->getViolations());
}