@dataProvider getInvalidEmails
public function testInvalidEmails($email) {
$constraint = new Email(array(
'message' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ value }}' => $email,
));
$this->validator
->validate($email, $constraint);
}