chore: update test to fix deprecation warning
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user