Added some tests to constraint validators

This commit is contained in:
Jan Böhmer 2023-07-02 23:59:06 +02:00
parent e72b120c12
commit 2ebb4fef4c
12 changed files with 719 additions and 14 deletions

View file

@ -53,7 +53,7 @@ class SelectableValidator extends ConstraintValidator
//Check type of value. Validating only works for StructuralDBElements
if (!$value instanceof AbstractStructuralDBElement) {
throw new UnexpectedValueException($value, 'StructuralDBElement');
throw new UnexpectedValueException($value, AbstractStructuralDBElement::class);
}
//Check if the value is not selectable -> show error message then.