MediaWiki  REL1_19
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()
 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
 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.

Definition at line 6 of file IPTest.php.


Member Function Documentation

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

Definition at line 286 of file IPTest.php.

References IP\parseCIDR().

Referenced by testCIDRParsing().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 292 of file IPTest.php.

References IP\parseCIDR().

Referenced by testCIDRParsing().

Here is the call graph for this function:

Here is the caller graph for this function:

Provider for IP::combineHostAndPort()

Definition at line 476 of file IPTest.php.

Provider for IP::testSanitizeRange()

Definition at line 496 of file IPTest.php.

Provider for testIPIsInRange()

Definition at line 407 of file IPTest.php.

Provider for IP::splitHostAndPort()

Definition at line 445 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 340 of file IPTest.php.

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

Here is the call graph for this function:

IPTest::testCombineHostAndPort ( expected,
input,
description 
)

Test for IP::combineHostAndPort() provideCombineHostAndPort.

Definition at line 465 of file IPTest.php.

References $input, and IP\combineHostAndPort().

Here is the call graph for this function:

IP::hexToOctet

Definition at line 315 of file IPTest.php.

References IP\hexToOctet().

Here is the call graph for this function:

IP::hexToQuad

Definition at line 300 of file IPTest.php.

References IP\hexToQuad().

Here is the call graph for this function:

IP::isValidBlock

Definition at line 231 of file IPTest.php.

References IP\isValidBlock().

Here is the call graph for this function:

IP::isValid

Definition at line 158 of file IPTest.php.

References $f, and IP\isValid().

Here is the call graph for this function:

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

Definition at line 264 of file IPTest.php.

References IP\toUnsigned().

Here is the call graph for this function:

IP::canonicalize

Definition at line 382 of file IPTest.php.

References IP\canonicalize().

Here is the call graph for this function:

IP::canonicalize

Definition at line 374 of file IPTest.php.

References IP\canonicalize().

Here is the call graph for this function:

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

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

Definition at line 398 of file IPTest.php.

References IP\isInRange().

Here is the call graph for this function:

not sure it should be tested with boolean false.

hashar 20100924 IP::isIPAddress

Definition at line 11 of file IPTest.php.

References IP\isIPAddress().

Here is the call graph for this function:

IP::isIPv4

Definition at line 96 of file IPTest.php.

References IP\isIPv4().

Here is the call graph for this function:

IP::isIPv6

Definition at line 41 of file IPTest.php.

References IP\isIPv6().

Here is the call graph for this function:

IP::isPublic

Definition at line 274 of file IPTest.php.

References IP\isPublic().

Here is the call graph for this function:

Improve IP::sanitizeIP() code coverage.

Todo:
Most probably incomplete

Definition at line 255 of file IPTest.php.

References IP\sanitizeIP().

Here is the call graph for this function:

IPTest::testSanitizeRange ( input,
expected,
description 
)

Test for IP::sanitizeRange() provideIPCIDRs.

Definition at line 489 of file IPTest.php.

References $input, and IP\sanitizeRange().

Here is the call graph for this function:

IPTest::testSplitHostAndPort ( expected,
input,
description 
)

Test for IP::splitHostAndPort().

provideSplitHostAndPort

Definition at line 438 of file IPTest.php.

References $input, and IP\splitHostAndPort().

Here is the call graph for this function:

IP::isValidBlock

Definition at line 208 of file IPTest.php.

References IP\isValidBlock().

Here is the call graph for this function:

IP::isValid

Definition at line 114 of file IPTest.php.

References $f, and IP\isValid().

Here is the call graph for this function:


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