mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
add test for accompanying period location validity
This commit is contained in:
@@ -11,7 +11,7 @@ class LocationValidity extends Constraint
|
||||
{
|
||||
public $messagePersonLocatedMustBeAssociated = "The person where the course is located must be associated to the course. Change course's location before removing the person.";
|
||||
|
||||
public $messagPeriodMustRemainsLocated = "The period must remains located";
|
||||
public $messagePeriodMustRemainsLocated = "The period must remains located";
|
||||
|
||||
public function getTargets()
|
||||
{
|
||||
|
@@ -42,10 +42,12 @@ class LocationValidityValidator extends ConstraintValidator
|
||||
|
||||
if ($period->getStep() !== AccompanyingPeriod::STEP_DRAFT
|
||||
&& $period->getLocationStatus() === 'none') {
|
||||
$this->context->buildViolation($constraint->messagePeriodMustRemainsLocated
|
||||
->addViolation()
|
||||
;
|
||||
|
||||
$this->context
|
||||
->buildViolation(
|
||||
$constraint->messagePeriodMustRemainsLocated
|
||||
)
|
||||
->addViolation()
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user