예제 #1
0
 function it_gets_all_blocked_hosts()
 {
     $hosts = $this->getBlocks();
     $hosts->shouldBeArray();
     $hosts->shouldHaveCount(2);
     $hosts->shouldContainIP(IP::fromString('123.0.0.1'));
 }
예제 #2
0
파일: IP.php 프로젝트: jpkleemans/firewall
 /**
  * Compare equality with another IP.
  *
  * @param IP $ip
  *
  * @return bool
  */
 public function equals(IP $ip)
 {
     return $ip->toString() === $this->value;
 }