You are here

public function EmailValidatorTest::testInvalidEmails in Plug 7

@dataProvider getInvalidEmails

File

lib/Symfony/validator/Symfony/Component/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();
}