mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
add test for new emailDNS validator
This commit is contained in:
parent
8603b2bec3
commit
7dcc8a5089
@ -560,6 +560,18 @@ class ValidateTest extends BaseTestCase
|
|||||||
$this->assertFalse($v->validate());
|
$this->assertFalse($v->validate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testEmailDnsValid(){
|
||||||
|
$v = new Validator(array('name' => 'Chester Tester', 'email' => 'chester@tester.com'));
|
||||||
|
$v->rule('emailDNS', 'email');
|
||||||
|
$this->assertTrue($v->validate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testEmailDnsInvalid(){
|
||||||
|
$v = new Validator(array('name' => 'Chester Tester', 'email' => 'chester@tester.zyx'));
|
||||||
|
$v->rule('emailDNS', 'email');
|
||||||
|
$this->assertFalse($v->validate());
|
||||||
|
}
|
||||||
|
|
||||||
public function testUrlValid()
|
public function testUrlValid()
|
||||||
{
|
{
|
||||||
$v = new Validator(array('website' => 'http://google.com'));
|
$v = new Validator(array('website' => 'http://google.com'));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user