MediaWiki
REL1_22
|
Tests for IP validity functions. More...
Public Member Functions | |
testCIDRParsing () | |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask. | |
testCombineHostAndPort ($expected, $input, $description) | |
Test for IP::combineHostAndPort() provideCombineHostAndPort. | |
testHexToOctet () | |
IP::hexToOctet | |
testHexToQuad () | |
IP::hexToQuad | |
testInvalidBlocks () | |
IP::isValidBlock | |
testInvalidIPs () | |
IP::isValid | |
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 () | |
not sure it should be tested with boolean false. | |
testisIPv4 () | |
IP::isIPv4 | |
testisIPv6 () | |
IP::isIPv6 | |
testPrettifyIP ($ip, $prettified) | |
Test for IP::prettifyIP() provideIPsToPrettify. | |
testPrivateIPs () | |
IP::isPublic | |
testSanitizeIP () | |
Improve IP::sanitizeIP() code coverage. | |
testSanitizeRange ($input, $expected, $description) | |
Test for IP::sanitizeRange() provideIPCIDRs. | |
testSplitHostAndPort ($expected, $input, $description) | |
Test for IP::splitHostAndPort(). | |
testToHex ($expected, $input) | |
IP::toHex provideToHex | |
testToUnsigned ($expected, $input) | |
IP::toUnsigned provideToUnsigned | |
testValidBlocks () | |
IP::isValidBlock | |
testValidIPs () | |
IP::isValid | |
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 | provideSplitHostAndPort () |
Provider for IP::splitHostAndPort() | |
static | provideToHex () |
Provider for IP::testToHex() | |
static | provideToUnsigned () |
Provider for IP::testToUnsigned() | |
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.
IPTest::assertFalseCIDR | ( | $ | CIDR, |
$ | msg = '' |
||
) | [private] |
Definition at line 341 of file IPTest.php.
References array(), and IP\parseCIDR().
Referenced by testCIDRParsing().
IPTest::assertNet | ( | $ | expected, |
$ | CIDR | ||
) | [private] |
Definition at line 347 of file IPTest.php.
References IP\parseCIDR().
Referenced by testCIDRParsing().
static IPTest::provideCombineHostAndPort | ( | ) | [static] |
Provider for IP::combineHostAndPort()
Definition at line 530 of file IPTest.php.
References array().
static IPTest::provideIPCIDRs | ( | ) | [static] |
static IPTest::provideIPsAndRanges | ( | ) | [static] |
static IPTest::provideIPsToPrettify | ( | ) | [static] |
static IPTest::provideSplitHostAndPort | ( | ) | [static] |
static IPTest::provideToHex | ( | ) | [static] |
static IPTest::provideToUnsigned | ( | ) | [static] |
IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask.
Definition at line 395 of file IPTest.php.
References array(), assertFalseCIDR(), assertNet(), and IP\parseCIDR().
IPTest::testCombineHostAndPort | ( | $ | expected, |
$ | input, | ||
$ | description | ||
) |
Test for IP::combineHostAndPort() provideCombineHostAndPort.
Definition at line 519 of file IPTest.php.
References IP\combineHostAndPort(), and list.
Definition at line 237 of file IPTest.php.
References array(), as, and IP\isValidBlock().
Definition at line 164 of file IPTest.php.
References $f, array(), as, and IP\isValid().
IPTest::testIPIsInRange | ( | $ | expected, |
$ | addr, | ||
$ | range, | ||
$ | message = '' |
||
) |
Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges.
Definition at line 452 of file IPTest.php.
References IP\isInRange().
not sure it should be tested with boolean false.
hashar 20100924 IP::isIPAddress
Definition at line 17 of file IPTest.php.
References array(), as, and IP\isIPAddress().
IPTest::testPrettifyIP | ( | $ | ip, |
$ | prettified | ||
) |
Test for IP::prettifyIP() provideIPsToPrettify.
Definition at line 567 of file IPTest.php.
References IP\prettifyIP().
Improve IP::sanitizeIP() code coverage.
Definition at line 261 of file IPTest.php.
References IP\sanitizeIP().
IPTest::testSanitizeRange | ( | $ | input, |
$ | expected, | ||
$ | description | ||
) |
Test for IP::sanitizeRange() provideIPCIDRs.
Definition at line 543 of file IPTest.php.
References IP\sanitizeRange().
IPTest::testSplitHostAndPort | ( | $ | expected, |
$ | input, | ||
$ | description | ||
) |
Test for IP::splitHostAndPort().
provideSplitHostAndPort
Definition at line 492 of file IPTest.php.
References IP\splitHostAndPort().
IPTest::testToHex | ( | $ | expected, |
$ | input | ||
) |
IP::toHex provideToHex
Definition at line 300 of file IPTest.php.
References $result, and IP\toHex().
IPTest::testToUnsigned | ( | $ | expected, |
$ | input | ||
) |
IP::toUnsigned provideToUnsigned
Definition at line 270 of file IPTest.php.
References $result, and IP\toUnsigned().
Definition at line 214 of file IPTest.php.
References array(), as, and IP\isValidBlock().
Definition at line 120 of file IPTest.php.
References $f, array(), as, and IP\isValid().