MediaWiki  REL1_22
PathRouterTest Class Reference

Tests for the PathRouter parsing. More...

Inheritance diagram for PathRouterTest:
Collaboration diagram for PathRouterTest:

List of all members.

Public Member Functions

 callbackForTest (&$matches, $data)
 testAdditionalParameter ()
 Test the handling of $2 inside paths.
 testBasic ()
 Test basic path parsing.
 testCallback ()
 testCharacters ()
 Make sure the router handles characters like +&() properly.
 testFail ()
 Test to ensure that matches are not made if a parameter expects nonexistent input.
 testKeyParameter ()
 Test the handling of key based arrays with a url parameter.
 testLength ()
 Ensure the router doesn't choke on long paths.
 testLoose ()
 Test loose path auto-$1.
 testOrder ()
 Test to ensure that path is based on specifity, not order.
 testPatternUrlencoding ()
 Ensure that the php passed site of parameter values are not urldecoded.
 testRawParamValue ()
 Ensure that raw parameter values do not have any variable replacements or urldecoding.
 testRegexpChars ($char)
 Make sure the router doesn't break on special characters like $ used in regexp replacements provideRegexpChars.
 testRestrictedValue ()
 Test additional restricted value parameter.
 testSpecial ()
 Make sure the router handles titles like Special:Recentchanges correctly.
 testUnicode ()
 Make sure the router handles unicode characters correctly testSpecial testUrlencoding testCharacters.
 testUrlencoding ()
 Make sure the router decodes urlencoding properly.
 testWeight ()
 Test to ensure weight of paths is handled correctly.

Static Public Member Functions

static provideRegexpChars ()

Protected Member Functions

 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.

Protected Attributes

PathRouter $basicRouter

Detailed Description

Tests for the PathRouter parsing.

Todo:
Add covers tags.

Definition at line 8 of file PathRouterTest.php.


Member Function Documentation

PathRouterTest::callbackForTest ( &$  matches,
data 
)

Definition at line 114 of file PathRouterTest.php.

Definition at line 194 of file PathRouterTest.php.

References array().

PathRouterTest::setUp ( ) [protected]

setUp and tearDown should (where significant) happen in reverse order.

Reimplemented from MediaWikiTestCase.

Definition at line 14 of file PathRouterTest.php.

References PathRouter\add().

Test the handling of $2 inside paths.

Definition at line 81 of file PathRouterTest.php.

Test basic path parsing.

Definition at line 24 of file PathRouterTest.php.

Definition at line 119 of file PathRouterTest.php.

References PathRouter\add(), and array().

Make sure the router handles characters like +&() properly.

Definition at line 215 of file PathRouterTest.php.

Test to ensure that matches are not made if a parameter expects nonexistent input.

Definition at line 137 of file PathRouterTest.php.

Test the handling of key based arrays with a url parameter.

Definition at line 71 of file PathRouterTest.php.

Ensure the router doesn't choke on long paths.

Definition at line 237 of file PathRouterTest.php.

Test loose path auto-$1.

Definition at line 32 of file PathRouterTest.php.

Test to ensure that path is based on specifity, not order.

Definition at line 52 of file PathRouterTest.php.

Ensure that the php passed site of parameter values are not urldecoded.

Definition at line 246 of file PathRouterTest.php.

Ensure that raw parameter values do not have any variable replacements or urldecoding.

Definition at line 256 of file PathRouterTest.php.

Make sure the router doesn't break on special characters like $ used in regexp replacements provideRegexpChars.

Definition at line 207 of file PathRouterTest.php.

Test additional restricted value parameter.

Definition at line 92 of file PathRouterTest.php.

Make sure the router handles titles like Special:Recentchanges correctly.

Definition at line 181 of file PathRouterTest.php.

Make sure the router handles unicode characters correctly testSpecial testUrlencoding testCharacters.

Definition at line 226 of file PathRouterTest.php.

Make sure the router decodes urlencoding properly.

Definition at line 189 of file PathRouterTest.php.

Test to ensure weight of paths is handled correctly.

Definition at line 147 of file PathRouterTest.php.


Member Data Documentation

PathRouter PathRouterTest::$basicRouter [protected]

Definition at line 12 of file PathRouterTest.php.


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