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}"); } }
/** * @dataProvider dataProvider */ public function testFind($ip, $record) { $this->assertEquals($record, Ip::getInstance()->find($ip)); }