use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
/**
* @group dns-sensitive
*/
class EmailValidatorTest extends ConstraintValidatorTestCase
{ use ExpectDeprecationTrait;
protected function createValidator(): EmailValidator
{ return new EmailValidator(Email::VALIDATION_MODE_HTML5
);
} public function testUnknownDefaultModeTriggerException() { $this->
expectException(\InvalidArgumentException::
class);
$this->
expectExceptionMessage('The "defaultMode" parameter value is not valid.'
);
new EmailValidator('Unknown Mode'
);
} public function testNullIsValid() {