MediaWiki REL1_31
|
Tests for IP validity functions. More...
Public Member Functions | |
provideInvalidIPs () | |
Provide a list of things that aren't IP addresses. | |
provideInvalidIPv4Addresses () | |
provideInvalidRanges () | |
provideIPsandHexes () | |
Provide some IP addresses and their equivalent hex representations. | |
provideOctetsAndHexes () | |
Provide some hex and octet representations of the same IPs. | |
provideValidIPv4Address () | |
Provide some IPv4 addresses and ranges. | |
provideValidRanges () | |
Provide some valid IP ranges. | |
testCIDRParsing () | |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask. | |
testCombineHostAndPort ( $expected, $input, $description) | |
IP::combineHostAndPort() provideCombineHostAndPort. | |
testHexToOctet ( $octet, $hex) | |
IP::hexToOctet provideOctetsAndHexes. | |
testHexToQuad ( $ip, $hex) | |
IP::hexToQuad provideIPsAndHexes. | |
testInvalidIPs () | |
IP::isValid. | |
testInvalidRanges ( $invalid) | |
IP::isValidRange provideInvalidRanges. | |
testIPCanonicalizeMappedAddress () | |
IP::canonicalize. | |
testIPCanonicalizeOnValidIp () | |
IP::canonicalize. | |
testIPIsInRange ( $expected, $addr, $range, $message='') | |
Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges. | |
testisIPAddress () | |
IP::isIPAddress. | |
testIsIPv4 ( $ip, $desc) | |
IP::isIPv4 provideValidIPv4Address. | |
testisIPv6 () | |
IP::isIPv6. | |
testIsNotIPAddress ( $val, $desc) | |
IP::isIPAddress provideInvalidIPs. | |
testisNotIPv4 ( $bogusIP, $desc) | |
IP::isIPv4 provideInvalidIPv4Addresses. | |
testIsPublic ( $expected, $input) | |
IP::isPublic provideIsPublic. | |
testPrettifyIP ( $ip, $prettified) | |
IP::prettifyIP() provideIPsToPrettify. | |
testSanitizeIP ( $expected, $input) | |
IP::sanitizeIP provideSanitizeIP. | |
testSanitizeRange ( $input, $expected, $description) | |
IP::sanitizeRange() provideIPCIDRs. | |
testSplitHostAndPort ( $expected, $input, $description) | |
IP::splitHostAndPort() provideSplitHostAndPort. | |
testToHex ( $expected, $input) | |
IP::toHex provideToHex. | |
testValidIPs () | |
IP::isValid. | |
testValidRanges ( $range) | |
IP::isValidRange provideValidRanges. | |
Static Public Member Functions | |
static | provideCombineHostAndPort () |
Provider for IP::combineHostAndPort() | |
static | provideIPCIDRs () |
Provider for IP::testSanitizeRange() | |
static | provideIPsAndRanges () |
Provider for testIPIsInRange() | |
static | provideIPsToPrettify () |
Provider for IP::testPrettifyIP() | |
static | provideIsPublic () |
Provider for IP::testIsPublic() | |
static | provideSanitizeIP () |
Provider for IP::testSanitizeIP() | |
static | provideSplitHostAndPort () |
Provider for IP::splitHostAndPort() | |
static | provideToHex () |
Provider for IP::testToHex() | |
Private Member Functions | |
assertFalseCIDR ( $CIDR, $msg='') | |
assertNet ( $expected, $CIDR) | |
Tests for IP validity functions.
Ported from /t/inc/IP.t by avar.
Definition at line 11 of file IPTest.php.
|
private |
|
private |
Definition at line 409 of file IPTest.php.
Referenced by testCIDRParsing().
|
static |
Provider for IP::combineHostAndPort()
Definition at line 607 of file IPTest.php.
IPTest::provideInvalidIPs | ( | ) |
Provide a list of things that aren't IP addresses.
Definition at line 26 of file IPTest.php.
IPTest::provideInvalidIPv4Addresses | ( | ) |
Definition at line 126 of file IPTest.php.
IPTest::provideInvalidRanges | ( | ) |
Definition at line 294 of file IPTest.php.
|
static |
Provider for IP::testSanitizeRange()
Definition at line 627 of file IPTest.php.
IPTest::provideIPsandHexes | ( | ) |
Provide some IP addresses and their equivalent hex representations.
Definition at line 425 of file IPTest.php.
|
static |
Provider for testIPIsInRange()
Definition at line 538 of file IPTest.php.
|
static |
Provider for IP::testPrettifyIP()
Definition at line 651 of file IPTest.php.
|
static |
IPTest::provideOctetsAndHexes | ( | ) |
Provide some hex and octet representations of the same IPs.
Definition at line 450 of file IPTest.php.
|
static |
Provider for IP::testSanitizeIP()
Definition at line 323 of file IPTest.php.
|
static |
|
static |
Provider for IP::testToHex()
Definition at line 355 of file IPTest.php.
IPTest::provideValidIPv4Address | ( | ) |
Provide some IPv4 addresses and ranges.
Definition at line 150 of file IPTest.php.
IPTest::provideValidRanges | ( | ) |
Provide some valid IP ranges.
Definition at line 261 of file IPTest.php.
IPTest::testCIDRParsing | ( | ) |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask.
IP::parseCIDR
Definition at line 472 of file IPTest.php.
References assertFalseCIDR(), and assertNet().
IPTest::testCombineHostAndPort | ( | $expected, | |
$input, | |||
$description ) |
IP::combineHostAndPort() provideCombineHostAndPort.
Definition at line 596 of file IPTest.php.
IPTest::testHexToOctet | ( | $octet, | |
$hex ) |
IP::hexToOctet provideOctetsAndHexes.
Definition at line 443 of file IPTest.php.
IPTest::testHexToQuad | ( | $ip, | |
$hex ) |
IP::hexToQuad provideIPsAndHexes.
Definition at line 418 of file IPTest.php.
IPTest::testInvalidIPs | ( | ) |
IP::isValid.
Definition at line 211 of file IPTest.php.
IPTest::testInvalidRanges | ( | $invalid | ) |
IP::isValidRange provideInvalidRanges.
Definition at line 290 of file IPTest.php.
IPTest::testIPCanonicalizeMappedAddress | ( | ) |
IP::canonicalize.
Definition at line 513 of file IPTest.php.
IPTest::testIPCanonicalizeOnValidIp | ( | ) |
IP::canonicalize.
Definition at line 505 of file IPTest.php.
IPTest::testIPIsInRange | ( | $expected, | |
$addr, | |||
$range, | |||
$message = '' ) |
Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges.
Definition at line 529 of file IPTest.php.
IPTest::testisIPAddress | ( | ) |
IP::isIPAddress.
Definition at line 46 of file IPTest.php.
IPTest::testIsIPv4 | ( | $ip, | |
$desc ) |
IP::isIPv4 provideValidIPv4Address.
Definition at line 143 of file IPTest.php.
IPTest::testisIPv6 | ( | ) |
IP::isIPv6.
Definition at line 63 of file IPTest.php.
IPTest::testIsNotIPAddress | ( | $val, | |
$desc ) |
IP::isIPAddress provideInvalidIPs.
Definition at line 19 of file IPTest.php.
IPTest::testisNotIPv4 | ( | $bogusIP, | |
$desc ) |
IP::isIPv4 provideInvalidIPv4Addresses.
Definition at line 122 of file IPTest.php.
IPTest::testIsPublic | ( | $expected, | |
$input ) |
IPTest::testPrettifyIP | ( | $ip, | |
$prettified ) |
IP::prettifyIP() provideIPsToPrettify.
Definition at line 644 of file IPTest.php.
IPTest::testSanitizeIP | ( | $expected, | |
$input ) |
IPTest::testSanitizeRange | ( | $input, | |
$expected, | |||
$description ) |
IPTest::testSplitHostAndPort | ( | $expected, | |
$input, | |||
$description ) |
IP::splitHostAndPort() provideSplitHostAndPort.
Definition at line 569 of file IPTest.php.
References $input.
IPTest::testToHex | ( | $expected, | |
$input ) |
IPTest::testValidIPs | ( | ) |
IP::isValid.
Definition at line 161 of file IPTest.php.
IPTest::testValidRanges | ( | $range | ) |
IP::isValidRange provideValidRanges.
Definition at line 282 of file IPTest.php.