You are here

public function EmailValidatorTest::testInvalidEmails in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\EmailValidatorTest::testInvalidEmails()
  2. 8.0 vendor/egulias/email-validator/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php \Egulias\Tests\EmailValidator\EmailValidatorTest::testInvalidEmails()
Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\EmailValidatorTest::testInvalidEmails()

@dataProvider getInvalidEmails

File

vendor/symfony/validator/Tests/Constraints/EmailValidatorTest.php, line 74

Class

EmailValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidEmails($email) {
  $constraint = new Email(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($email, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $email . '"')
    ->setCode(Email::INVALID_FORMAT_ERROR)
    ->assertRaised();
}