Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored Jan 7, 2025
1 parent 1531552 commit 12643e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/IPUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class IPUtilsTest extends TestCase
{
public function getIPSanitizationData()
public static function getIPSanitizationData()
{
return array( // input, output
// single IPv4 address
Expand Down Expand Up @@ -66,7 +66,7 @@ public function testSanitizeIp($ip, $expected)
$this->assertEquals($expected, IPUtils::sanitizeIp($ip));
}

public function getIPRangeSanitizationData()
public static function getIPRangeSanitizationData()
{
return array(
array('', null),
Expand Down Expand Up @@ -136,7 +136,7 @@ public function testSanitizeIpRange($ip, $expected)
$this->assertSame($expected, IPUtils::sanitizeIpRange($ip));
}

public function getIPData()
public static function getIPData()
{
return array(
// IPv4
Expand All @@ -162,7 +162,7 @@ public function testStringToBinaryIP($string, $binary)
$this->assertEquals($binary, IPUtils::stringToBinaryIP($string));
}

public function getInvalidIPData()
public static function getInvalidIPData()
{
return array(
// not a series of dotted numbers
Expand Down Expand Up @@ -194,7 +194,7 @@ public function testStringToBinaryInvalidIP($stringIp)
$this->assertEquals("\x00\x00\x00\x00", IPUtils::stringToBinaryIP($stringIp));
}

public function getBinaryIPData()
public static function getBinaryIPData()
{
// a valid network address is either 4 or 16 bytes; those lines are intentionally left blank ;)
return array(
Expand Down Expand Up @@ -236,7 +236,7 @@ public function testBinaryToStringInvalidIP($binary)
$this->assertEquals('0.0.0.0', IPUtils::binaryToStringIP($binary), bin2hex($binary));
}

public function getBoundsForIPRangeTest()
public static function getBoundsForIPRangeTest()
{
return array(

Expand Down

0 comments on commit 12643e3

Please sign in to comment.