Commit 7b5b93ef by Carsten Brandt

fixed email validator test break

parent 4079acf4
...@@ -78,10 +78,14 @@ class EmailValidatorTest extends TestCase ...@@ -78,10 +78,14 @@ class EmailValidatorTest extends TestCase
public function testValidateValueMx() public function testValidateValueMx()
{ {
$validator = new EmailValidator(); $validator = new EmailValidator();
$validator->checkMX = true;
$validator->checkDNS = true;
$this->assertTrue($validator->validateValue('5011@gmail.com')); $this->assertTrue($validator->validateValue('5011@gmail.com'));
$this->assertFalse($validator->validateValue('test@example.com'));
$validator->checkDNS = false;
$this->assertTrue($validator->validateValue('test@nonexistingsubdomain.example.com'));
$validator->checkDNS = true;
$this->assertFalse($validator->validateValue('test@nonexistingsubdomain.example.com'));
} }
public function testValidateAttribute() public function testValidateAttribute()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment