示例#1
0
 /**
  * @dataProvider dataProvider
  */
 public function testIPv4($ip, $result)
 {
     $validator = new IPv4();
     $this->assertEquals($validator->validate($ip), $result);
 }
示例#2
0
文件: IP.php 项目: sorrina/Validator
 public function validate($input)
 {
     $ipv4_validator = new IPv4();
     $ipv6_validator = new IPv6();
     return $ipv4_validator->validate($input) || $ipv6_validator->validate($input);
 }