예제 #1
0
파일: IpAllTest.php 프로젝트: wenbinye/ipip
 public function testFind()
 {
     $ipfinder = Ip::getInstance();
     foreach ($ipfinder->getAllIp() as $ip) {
         $ret = ZzcIp::find($ip);
         if ($ret[0] === '保留地址') {
             $ret = ['', '', '', ''];
         }
         $this->assertEquals($ret, $ipfinder->find($ip), "check {$ip}");
     }
 }
예제 #2
0
파일: IpTest.php 프로젝트: wenbinye/ipip
 /**
  * @dataProvider dataProvider
  */
 public function testFind($ip, $record)
 {
     $this->assertEquals($record, Ip::getInstance()->find($ip));
 }