Go to the documentation of this file.
7 #### TESTS ##############################################################
23 #### HELPERS #############################################################
34 $old = isset( $_SERVER[
'SERVER_SOFTWARE'] )
35 ? $_SERVER[
'SERVER_SOFTWARE']
37 $_SERVER[
'SERVER_SOFTWARE'] = $server;
44 "Encoding '$input' for server '$server' should be '$expected'"
48 if ( $old ===
null ) {
49 unset( $_SERVER[
'SERVER_SOFTWARE'] );
51 $_SERVER[
'SERVER_SOFTWARE'] = $old;
61 if ( is_string( $expectations ) ) {
63 } elseif ( is_array( $expectations ) ) {
64 if ( !array_key_exists( $server, $expectations ) ) {
65 throw new MWException( __METHOD__ .
" expectation does not have any value for server name $server. Check the provider array.\n" );
67 return $expectations[$server];
70 throw new MWException( __METHOD__ .
" given invalid expectation for '$server'. Should be a string or an array( <http server name> => <string> ).\n" );
74 #### PROVIDERS ###########################################################
98 'Microsoft-IIS/7' =>
'%3A',
112 array(
'[]',
'%5B%5D' ),
113 array(
'<>',
'%3C%3E' ),
116 array(
'\'',
'%27' ),
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
The function only need a string parameter and might react to IIS7.0 @covers wfUrlencode.
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
verifyEncodingFor( $server, $input, $expectations)
Internal helper that actually run the test.
static provideURLS()
Format is either: array( 'input', 'expected' ); Or: array( 'input', array( 'Apache',...
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
testEncodingUrlWith( $input, $expected)
@dataProvider provideURLS
extractExpect( $server, $expectations)
Interprets the provider array.
testEncodingUrlWithMicrosoftIis7( $input, $expected)
@dataProvider provideURLS