MediaWiki
REL1_19
|
Tests for includes/GlobalFunctions.php -> wfUrlencode() More...
Public Member Functions | |
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. | |
testEncodingUrlWith ($input, $expected) | |
provideURLS | |
testEncodingUrlWithMicrosoftIis7 ($input, $expected) | |
provideURLS | |
Private Member Functions | |
extractExpect ($server, $expectations) | |
Interprets the provider array. | |
verifyEncodingFor ($server, $input, $expectations) | |
Internal helper that actually run the test. |
Tests for includes/GlobalFunctions.php -> wfUrlencode()
The function only need a string parameter and might react to IIS7.0
Definition at line 8 of file wfUrlencodeTest.php.
wfUrlencodeTest::extractExpect | ( | $ | server, |
$ | expectations | ||
) | [private] |
Interprets the provider array.
Return expected value depending the HTTP server name.
Definition at line 60 of file wfUrlencodeTest.php.
Referenced by verifyEncodingFor().
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 88 of file wfUrlencodeTest.php.
wfUrlencodeTest::testEncodingUrlWith | ( | $ | input, |
$ | expected | ||
) |
provideURLS
Definition at line 13 of file wfUrlencodeTest.php.
References $input, and verifyEncodingFor().
wfUrlencodeTest::testEncodingUrlWithMicrosoftIis7 | ( | $ | input, |
$ | expected | ||
) |
provideURLS
Definition at line 18 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 29 of file wfUrlencodeTest.php.
References $input, extractExpect(), and wfUrlencode().
Referenced by testEncodingUrlWith(), and testEncodingUrlWithMicrosoftIis7().