chore: update test to fix deprecation warning

This commit is contained in:
Björn Fromme
2026-03-16 12:02:59 +01:00
parent 8e7e6266f0
commit 7d91dcfb70
@@ -14,6 +14,8 @@ use App\Validator\Constraints\PromoVoucherValidator;
use App\Validator\Constraints\PurchaseVoucherValidator;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\EmailValidator;
use Symfony\Component\Validator\ConstraintValidatorFactoryInterface;
use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Validation;
@@ -56,6 +58,10 @@ class ParticipantEditDtoTest extends TestCase
return new PromoVoucherValidator($this->voucherService, $this->priceCalculatorService);
}
if (EmailValidator::class === $className) {
return new EmailValidator(Email::VALIDATION_MODE_HTML5);
}
return new $className();
}
};