Beispiel #1
0
 /**
  * Validates the IP address format and splits in segments into groups
  *
  * @param $address
  * @return bool
  * @throws \Exception
  */
 protected function validateAddressFormat($address)
 {
     $this->ip = $this->filter->filter($address);
     return true;
 }
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage IP address has too many segments
  */
 public function testExceptionTooManySegments()
 {
     $segments = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
     $string = implode(':', $segments);
     self::$class->filter($string);
 }