* @covers ::wfUrlencode
*/
class WfUrlencodeTest extends MediaWikiTestCase {
- #### TESTS ##############################################################
+ # ### TESTS ##############################################################
/**
* @dataProvider provideURLS
$this->verifyEncodingFor( 'Microsoft-IIS/7', $input, $expected );
}
- #### HELPERS #############################################################
+ # ### HELPERS #############################################################
/**
* Internal helper that actually run the test.
}
}
- #### PROVIDERS ###########################################################
+ # ### PROVIDERS ###########################################################
/**
* Format is either:
*/
public static function provideURLS() {
return array(
- ### RFC 1738 chars
+ # ## RFC 1738 chars
// + is not safe
array( '+', '%2B' ),
// & and = not safe in queries
// remaining chars do not need encoding
array(
- ';@$-_.!*\'',
- ';@$-_.!*\'',
+ ';@$-_.!*',
+ ';@$-_.!*',
),
- ### Other tests
+ # ## Other tests
// slash remain unchanged. %2F seems to break things
array( '/', '/' ),
// T105265
// Other 'funnies' chars
array( '[]', '%5B%5D' ),
array( '<>', '%3C%3E' ),
+
+ // Apostrophe is encoded
+ array( '\'', '%27' ),
);
}
}