/** * Used small set for testing */ public function testValidEmailWithDomainCheck() { $validator = new Email(true); $this->assertTrue($validator->validate('*****@*****.**')); $this->assertFalse($validator->validate('a@a.a')); }
/** * @dataProvider providerForFail * @expectedException \Bluz\Validator\Exception\ValidatorException */ public function testInvalidEmailsShouldFailValidation($invalidEmail) { $validator = new Email(); $this->assertFalse($validator->validate($invalidEmail)); $this->assertFalse($validator->assert($invalidEmail)); }