MediaWiki  REL1_20
IPTest Class Reference

Tests for IP validity functions. More...

Inheritance diagram for IPTest:
Collaboration diagram for IPTest:

List of all members.

Public Member Functions

 provideCombineHostAndPort ()
 Provider for IP::combineHostAndPort()
 provideIPCIDRs ()
 Provider for IP::testSanitizeRange()
 provideIPsAndRanges ()
 Provider for testIPIsInRange()
 provideIPsToPrettify ()
 Provider for IP::testPrettifyIP()
 provideSplitHostAndPort ()
 Provider for IP::splitHostAndPort()
 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
 testip2longWrapper ()
 test wrapper around ip2long which might return -1 or false depending on PHP version IP::toUnsigned
 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().
 testValidBlocks ()
 IP::isValidBlock
 testValidIPs ()
 IP::isValid

Private Member Functions

 assertFalseCIDR ($CIDR, $msg='')
 assertNet ($expected, $CIDR)

Detailed Description

Tests for IP validity functions.

Ported from /t/inc/IP.t by avar. IP

Definition at line 7 of file IPTest.php.


Member Function Documentation

IPTest::assertFalseCIDR ( CIDR,
msg = '' 
) [private]

Definition at line 287 of file IPTest.php.

References IP\parseCIDR().

Referenced by testCIDRParsing().

IPTest::assertNet ( expected,
CIDR 
) [private]

Definition at line 293 of file IPTest.php.

References IP\parseCIDR().

Referenced by testCIDRParsing().

Provider for IP::combineHostAndPort()

Definition at line 477 of file IPTest.php.

Provider for IP::testSanitizeRange()

Definition at line 497 of file IPTest.php.

Provider for testIPIsInRange()

Definition at line 408 of file IPTest.php.

Provider for IP::testPrettifyIP()

Definition at line 521 of file IPTest.php.

Provider for IP::splitHostAndPort()

Definition at line 446 of file IPTest.php.

IP::parseCIDR() returns an array containing a signed IP address representing the network mask and the bit mask.

IP::parseCIDR

Definition at line 341 of file IPTest.php.

References assertFalseCIDR(), assertNet(), and IP\parseCIDR().

IPTest::testCombineHostAndPort ( expected,
input,
description 
)

Test for IP::combineHostAndPort() provideCombineHostAndPort.

Definition at line 466 of file IPTest.php.

References $input, and IP\combineHostAndPort().

IP::hexToOctet

Definition at line 316 of file IPTest.php.

References IP\hexToOctet().

IP::hexToQuad

Definition at line 301 of file IPTest.php.

References IP\hexToQuad().

IP::isValidBlock

Definition at line 232 of file IPTest.php.

References IP\isValidBlock().

IP::isValid

Definition at line 159 of file IPTest.php.

References $f, and IP\isValid().

test wrapper around ip2long which might return -1 or false depending on PHP version IP::toUnsigned

Definition at line 265 of file IPTest.php.

References IP\toUnsigned().

IPTest::testIPIsInRange ( expected,
addr,
range,
message = '' 
)

Issues there are most probably from IP::toHex() or IP::parseRange() IP::isInRange provideIPsAndRanges.

Definition at line 399 of file IPTest.php.

References IP\isInRange().

not sure it should be tested with boolean false.

hashar 20100924 IP::isIPAddress

Definition at line 12 of file IPTest.php.

References IP\isIPAddress().

IP::isIPv4

Definition at line 97 of file IPTest.php.

References IP\isIPv4().

IP::isIPv6

Definition at line 42 of file IPTest.php.

References IP\isIPv6().

IPTest::testPrettifyIP ( ip,
prettified 
)

Test for IP::prettifyIP() provideIPsToPrettify.

Definition at line 514 of file IPTest.php.

References IP\prettifyIP().

IP::isPublic

Definition at line 275 of file IPTest.php.

References IP\isPublic().

Improve IP::sanitizeIP() code coverage.

Todo:
Most probably incomplete

Definition at line 256 of file IPTest.php.

References IP\sanitizeIP().

IPTest::testSanitizeRange ( input,
expected,
description 
)

Test for IP::sanitizeRange() provideIPCIDRs.

Definition at line 490 of file IPTest.php.

References $input, and IP\sanitizeRange().

IPTest::testSplitHostAndPort ( expected,
input,
description 
)

Test for IP::splitHostAndPort().

provideSplitHostAndPort

Definition at line 439 of file IPTest.php.

References $input, and IP\splitHostAndPort().

IP::isValidBlock

Definition at line 209 of file IPTest.php.

References IP\isValidBlock().

IP::isValid

Definition at line 115 of file IPTest.php.

References $f, and IP\isValid().


The documentation for this class was generated from the following file: