Пример #1
0
 /**
  * Test Engine::collapseIps
  */
 public function test_collapse_ips_returns_array()
 {
     $ipArray = $this->engine->collapseIps($this->get_array_iterator_of_ip_addresses());
     $this->assertInternalType('array', $ipArray);
     $this->assertSame(14, sizeof($ipArray));
 }
Пример #2
0
 /**
  * Is the remote IP string (IPv4 - e.g. 192.168.0.1) in the Tor list?
  *
  * @param string $remoteIp
  * @return boolean
  */
 public function isTor($remoteIp)
 {
     return $this->engine->checkIp($remoteIp, json_decode($this->storage->read(), true));
 }