MediaWiki  master
WfUrlencodeTest Class Reference

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

Inheritance diagram for WfUrlencodeTest:
Collaboration diagram for WfUrlencodeTest:

Public Member Functions

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

Static Public Member Functions

static provideURLS ()
 Format is either: [ 'input', 'expected' ]; Or: [ 'input', [ 'Apache', 'expected' ], [ '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. More...
 

Private Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from MediaWikiUnitTestCase
 setUp ()
 
 tearDown ()
 

Detailed Description

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

GlobalFunctions wfUrlencode

Definition at line 9 of file wfUrlencodeTest.php.

Member Function Documentation

◆ extractExpect()

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

◆ provideURLS()

static WfUrlencodeTest::provideURLS ( )
static

Format is either: [ 'input', 'expected' ]; Or: [ 'input', [ 'Apache', 'expected' ], [ '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 89 of file wfUrlencodeTest.php.

◆ testEncodingUrlWith()

WfUrlencodeTest::testEncodingUrlWith (   $input,
  $expected 
)

provideURLS

Definition at line 15 of file wfUrlencodeTest.php.

References $input, and verifyEncodingFor().

◆ testEncodingUrlWithMicrosoftIis7()

WfUrlencodeTest::testEncodingUrlWithMicrosoftIis7 (   $input,
  $expected 
)

provideURLS

Definition at line 22 of file wfUrlencodeTest.php.

References $input, and verifyEncodingFor().

◆ verifyEncodingFor()

WfUrlencodeTest::verifyEncodingFor (   $server,
  $input,
  $expectations 
)
private

Internal helper that actually run the test.

Called by the public methods testEncodingUrlWith...()

Definition at line 32 of file wfUrlencodeTest.php.

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

Referenced by testEncodingUrlWith(), and testEncodingUrlWithMicrosoftIis7().


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