|
@@ 22-28 (lines=7) @@
|
| 19 |
|
$this->assertFalse(Util::is_ipaddr(['10.10.10.10'])); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
public function testIPLessThan() |
| 23 |
|
{ |
| 24 |
|
$this->assertTrue(Util::ip_less_than('10.10.10.0', '10.10.10.1')); |
| 25 |
|
$this->assertTrue(Util::ip_less_than('10.10.10.0', '10.10.20.0')); |
| 26 |
|
$this->assertTrue(Util::ip_less_than('10.10.10.10', '10.10.20.0')); |
| 27 |
|
$this->assertFalse(Util::ip_less_than('10.10.10.2', '10.10.10.1')); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testIPGreaterThan() |
| 31 |
|
{ |
|
@@ 30-36 (lines=7) @@
|
| 27 |
|
$this->assertFalse(Util::ip_less_than('10.10.10.2', '10.10.10.1')); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testIPGreaterThan() |
| 31 |
|
{ |
| 32 |
|
$this->assertFalse(Util::ip_greater_than('10.10.10.0', '10.10.10.1')); |
| 33 |
|
$this->assertTrue(Util::ip_greater_than('10.10.10.2', '10.10.10.1')); |
| 34 |
|
$this->assertTrue(Util::ip_greater_than('10.10.20.0', '10.10.10.0')); |
| 35 |
|
$this->assertTrue(Util::ip_greater_than('10.10.20.0', '10.10.10.20')); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public function testIPAfter() |
| 39 |
|
{ |