MediaWiki  REL1_21
WfUrlencodeTest Class Reference

Tests for wfUrlencode() More...

Inheritance diagram for WfUrlencodeTest:
Collaboration diagram for WfUrlencodeTest:

List of all members.

Public Member Functions

 testEncodingUrlWith ($input, $expected)
 provideURLS
 testEncodingUrlWithMicrosoftIis7 ($input, $expected)
 provideURLS

Static Public Member Functions

static provideURLS ()
 Format is either: array( 'input', 'expected' ); Or: array( 'input', array( 'Apache', 'expected' ), array( 'Microsoft-IIS/7', 'expected' ), ), If you want to add other HTTP server name, you will have to add a new testing method much like the testEncodingUrlWith() method above.

Private Member Functions

 extractExpect ($server, $expectations)
 Interprets the provider array.
 verifyEncodingFor ($server, $input, $expectations)
 Internal helper that actually run the test.

Detailed Description

Tests for wfUrlencode()

The function only need a string parameter and might react to IIS7.0

Definition at line 7 of file wfUrlencodeTest.php.


Member Function Documentation

WfUrlencodeTest::extractExpect ( server,
expectations 
) [private]

Interprets the provider array.

Return expected value depending the HTTP server name.

Definition at line 57 of file wfUrlencodeTest.php.

Referenced by verifyEncodingFor().

static WfUrlencodeTest::provideURLS ( ) [static]

Format is either: array( 'input', 'expected' ); Or: array( 'input', array( 'Apache', 'expected' ), array( 'Microsoft-IIS/7', 'expected' ), ), If you want to add other HTTP server name, you will have to add a new testing method much like the testEncodingUrlWith() method above.

Definition at line 84 of file wfUrlencodeTest.php.

References array().

WfUrlencodeTest::testEncodingUrlWith ( input,
expected 
)

provideURLS

Definition at line 11 of file wfUrlencodeTest.php.

References $input, and verifyEncodingFor().

provideURLS

Definition at line 16 of file wfUrlencodeTest.php.

References $input, and verifyEncodingFor().

WfUrlencodeTest::verifyEncodingFor ( server,
input,
expectations 
) [private]

Internal helper that actually run the test.

Called by the public methods testEncodingUrlWith...()

Definition at line 27 of file wfUrlencodeTest.php.

References $input, extractExpect(), and wfUrlencode().

Referenced by testEncodingUrlWith(), and testEncodingUrlWithMicrosoftIis7().


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