chore: update test to fix deprecation warning

This commit is contained in:
Björn Fromme
2026-01-20 16:05:48 +01:00
parent cfe19b7a74
commit e7a139b025
@@ -14,6 +14,8 @@ use App\Validator\Constraints\PromoVoucherValidator;
use App\Validator\Constraints\PurchaseVoucherValidator; use App\Validator\Constraints\PurchaseVoucherValidator;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Constraint; 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\ConstraintValidatorFactoryInterface;
use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\ConstraintValidatorInterface;
use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Validation;
@@ -56,6 +58,10 @@ class ParticipantEditDtoTest extends TestCase
return new PromoVoucherValidator($this->voucherService, $this->priceCalculatorService); return new PromoVoucherValidator($this->voucherService, $this->priceCalculatorService);
} }
if (EmailValidator::class === $className) {
return new EmailValidator(Email::VALIDATION_MODE_HTML5);
}
return new $className(); return new $className();
} }
}; };