MediaWiki
1.28.0
|
Tests for IP validity functions. More...
Public Member Functions | |
isNotIPAddress ($val, $desc) | |
IP::isIPAddress provideInvalidIPs. More... | |
provideInvalidBlocks () | |
provideInvalidIPs () | |
Provide a list of things that aren't IP addresses. More... | |
provideInvalidIPv4Addresses () | |
provideIPsandHexes () | |
Provide some IP addresses and their equivalent hex representations. More... | |
provideOctetsAndHexes () | |
Provide some hex and octet representations of the same IPs. More... | |
provideValidBlocks () | |
Provide some valid IP blocks. More... | |
provideValidIPv4Address () | |
Provide some IPv4 addresses and ranges. More... | |
testCIDRParsing () | |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask. More... | |
testCombineHostAndPort ($expected, $input, $description) | |
Test for IP::combineHostAndPort() provideCombineHostAndPort. More... | |
testHexToOctet ($octet, $hex) | |
IP::hexToOctet provideOctetsAndHexes. More... | |
testHexToQuad ($ip, $hex) | |
IP::hexToQuad provideIPsAndHexes. More... | |
testInvalidBlocks ($invalid) | |
IP::isValidBlock provideInvalidBlocks. More... | |
testInvalidIPs () | |
IP::isValid. More... | |
testIPCanonicalizeMappedAddress () | |
IP::canonicalize. More... | |
testIPCanonicalizeOnValidIp () | |
IP::canonicalize. More... | |
testIPIsInRange ($expected, $addr, $range, $message= '') | |
Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges. More... | |
testisIPAddress () | |
IP::isIPAddress. More... | |
testIsIPv4 ($ip, $desc) | |
IP::isIPv4 provideValidIPv4Address. More... | |
testisIPv6 () | |
IP::isIPv6. More... | |
testisNotIPv4 ($bogusIP, $desc) | |
IP::isIPv4 provideInvalidIPv4Addresses. More... | |
testIsPublic ($expected, $input) | |
IP::isPublic provideIsPublic. More... | |
testPrettifyIP ($ip, $prettified) | |
Test for IP::prettifyIP() provideIPsToPrettify. More... | |
testSanitizeIP ($expected, $input) | |
IP::sanitizeIP provideSanitizeIP. More... | |
testSanitizeRange ($input, $expected, $description) | |
Test for IP::sanitizeRange() provideIPCIDRs. More... | |
testSplitHostAndPort ($expected, $input, $description) | |
Test for IP::splitHostAndPort(). More... | |
testToHex ($expected, $input) | |
IP::toHex provideToHex. More... | |
testValidBlocks ($block) | |
IP::isValidBlock provideValidBlocks. More... | |
testValidIPs () | |
IP::isValid. More... | |
Static Public Member Functions | |
static | provideCombineHostAndPort () |
Provider for IP::combineHostAndPort() More... | |
static | provideIPCIDRs () |
Provider for IP::testSanitizeRange() More... | |
static | provideIPsAndRanges () |
Provider for testIPIsInRange() More... | |
static | provideIPsToPrettify () |
Provider for IP::testPrettifyIP() More... | |
static | provideIsPublic () |
Provider for IP::testIsPublic() More... | |
static | provideSanitizeIP () |
Provider for IP::testSanitizeIP() More... | |
static | provideSplitHostAndPort () |
Provider for IP::splitHostAndPort() More... | |
static | provideToHex () |
Provider for IP::testToHex() More... | |
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 12 of file IPTest.php.
|
private |
Definition at line 401 of file IPTest.php.
References false, and IP\parseCIDR().
Referenced by testCIDRParsing().
|
private |
Definition at line 407 of file IPTest.php.
References IP\parseCIDR().
Referenced by testCIDRParsing().
IPTest::isNotIPAddress | ( | $val, | |
$desc | |||
) |
IP::isIPAddress provideInvalidIPs.
Definition at line 17 of file IPTest.php.
References IP\isIPAddress().
|
static |
Provider for IP::combineHostAndPort()
Definition at line 605 of file IPTest.php.
IPTest::provideInvalidBlocks | ( | ) |
Definition at line 292 of file IPTest.php.
IPTest::provideInvalidIPs | ( | ) |
Provide a list of things that aren't IP addresses.
Definition at line 24 of file IPTest.php.
IPTest::provideInvalidIPv4Addresses | ( | ) |
Definition at line 124 of file IPTest.php.
|
static |
Provider for IP::testSanitizeRange()
Definition at line 625 of file IPTest.php.
IPTest::provideIPsandHexes | ( | ) |
Provide some IP addresses and their equivalent hex representations.
Definition at line 423 of file IPTest.php.
|
static |
Provider for testIPIsInRange()
Definition at line 536 of file IPTest.php.
|
static |
Provider for IP::testPrettifyIP()
Definition at line 649 of file IPTest.php.
|
static |
IPTest::provideOctetsAndHexes | ( | ) |
Provide some hex and octet representations of the same IPs.
Definition at line 448 of file IPTest.php.
|
static |
Provider for IP::testSanitizeIP()
Definition at line 321 of file IPTest.php.
|
static |
|
static |
Provider for IP::testToHex()
Definition at line 353 of file IPTest.php.
IPTest::provideValidBlocks | ( | ) |
Provide some valid IP blocks.
Definition at line 259 of file IPTest.php.
IPTest::provideValidIPv4Address | ( | ) |
Provide some IPv4 addresses and ranges.
Definition at line 148 of file IPTest.php.
IPTest::testCIDRParsing | ( | ) |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask.
Definition at line 470 of file IPTest.php.
References assertFalseCIDR(), assertNet(), and IP\parseCIDR().
IPTest::testCombineHostAndPort | ( | $expected, | |
$input, | |||
$description | |||
) |
Test for IP::combineHostAndPort() provideCombineHostAndPort.
Definition at line 594 of file IPTest.php.
References IP\combineHostAndPort(), and list.
IPTest::testHexToOctet | ( | $octet, | |
$hex | |||
) |
IP::hexToOctet provideOctetsAndHexes.
Definition at line 441 of file IPTest.php.
References IP\hexToOctet().
IPTest::testHexToQuad | ( | $ip, | |
$hex | |||
) |
IP::hexToQuad provideIPsAndHexes.
Definition at line 416 of file IPTest.php.
References IP\hexToQuad().
IPTest::testInvalidBlocks | ( | $invalid | ) |
IP::isValidBlock provideInvalidBlocks.
Definition at line 288 of file IPTest.php.
References IP\isValidBlock().
IPTest::testInvalidIPs | ( | ) |
IPTest::testIPCanonicalizeMappedAddress | ( | ) |
IPTest::testIPCanonicalizeOnValidIp | ( | ) |
IPTest::testIPIsInRange | ( | $expected, | |
$addr, | |||
$range, | |||
$message = '' |
|||
) |
Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges.
Definition at line 527 of file IPTest.php.
References IP\isInRange().
IPTest::testisIPAddress | ( | ) |
IPTest::testIsIPv4 | ( | $ip, | |
$desc | |||
) |
IP::isIPv4 provideValidIPv4Address.
Definition at line 141 of file IPTest.php.
References IP\isIPv4().
IPTest::testisIPv6 | ( | ) |
IPTest::testisNotIPv4 | ( | $bogusIP, | |
$desc | |||
) |
IP::isIPv4 provideInvalidIPv4Addresses.
Definition at line 120 of file IPTest.php.
References IP\isIPv4().
IPTest::testIsPublic | ( | $expected, | |
$input | |||
) |
IPTest::testPrettifyIP | ( | $ip, | |
$prettified | |||
) |
Test for IP::prettifyIP() provideIPsToPrettify.
Definition at line 642 of file IPTest.php.
References IP\prettifyIP().
IPTest::testSanitizeIP | ( | $expected, | |
$input | |||
) |
IP::sanitizeIP provideSanitizeIP.
Definition at line 313 of file IPTest.php.
References IP\sanitizeIP().
IPTest::testSanitizeRange | ( | $input, | |
$expected, | |||
$description | |||
) |
Test for IP::sanitizeRange() provideIPCIDRs.
Definition at line 618 of file IPTest.php.
References IP\sanitizeRange().
IPTest::testSplitHostAndPort | ( | $expected, | |
$input, | |||
$description | |||
) |
Test for IP::splitHostAndPort().
provideSplitHostAndPort
Definition at line 567 of file IPTest.php.
References IP\splitHostAndPort().
IPTest::testToHex | ( | $expected, | |
$input | |||
) |
IPTest::testValidBlocks | ( | $block | ) |
IP::isValidBlock provideValidBlocks.
Definition at line 280 of file IPTest.php.
References IP\isValidBlock().
IPTest::testValidIPs | ( | ) |