mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -42,7 +42,7 @@ class FormValidator extends ConstraintValidator
|
||||
return;
|
||||
}
|
||||
|
||||
/* @var FormInterface $form */
|
||||
/** @var FormInterface $form */
|
||||
$config = $form->getConfig();
|
||||
|
||||
$validator = $this->context->getValidator()->inContext($this->context);
|
||||
@@ -95,7 +95,7 @@ class FormValidator extends ConstraintValidator
|
||||
$fieldFormConstraint = new Form();
|
||||
$fieldFormConstraint->groups = $group;
|
||||
$this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath());
|
||||
$validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $fieldFormConstraint, $group);
|
||||
$validator->atPath(\sprintf('children[%s]', $field->getName()))->validate($field, $fieldFormConstraint, $group);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class FormValidator extends ConstraintValidator
|
||||
if ($field->isSubmitted()) {
|
||||
$this->resolvedGroups[$field] = $groups;
|
||||
$this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath());
|
||||
$validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $formConstraint);
|
||||
$validator->atPath(\sprintf('children[%s]', $field->getName()))->validate($field, $formConstraint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class FormValidator extends ConstraintValidator
|
||||
if (!$child->isSynchronized()) {
|
||||
$childrenSynchronized = false;
|
||||
$this->context->setNode($this->context->getValue(), $child, $this->context->getMetadata(), $this->context->getPropertyPath());
|
||||
$validator->atPath(sprintf('children[%s]', $child->getName()))->validate($child, $formConstraint);
|
||||
$validator->atPath(\sprintf('children[%s]', $child->getName()))->validate($child, $formConstraint);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user