From 91fb54d0f9eb45e4a76b6042203ea0d381ef4f10 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 20 Mar 2011 21:30:24 +0000 Subject: [PATCH] Reverted r84386; breakage too severe --- RELEASE-NOTES | 1 - includes/Setup.php | 6 - includes/Title.php | 58 ++----- tests/parser/parserTests.txt | 242 +++++++++++++-------------- tests/phpunit/includes/TitleTest.php | 105 ------------ 5 files changed, 138 insertions(+), 274 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 805ef2c7ff..e1f89d3c03 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -118,7 +118,6 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 27924) PhpHttpRequest doesn't return response body if HTTP != 200 * Added hook BitmapHandlerTransform to allow extension to transform a file without overriding the entire handler. -* Generates nicer URL whenever possible. === Bug fixes in 1.18 === * (bug 23119) WikiError class and subclasses are now marked as deprecated diff --git a/includes/Setup.php b/includes/Setup.php index 0f95c18191..9a217ed72a 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -41,12 +41,6 @@ if ( $wgArticlePath === false ) { } } -if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) { - # 'view' is assumed the default action path everywhere in the code - # but is rarely filled in $wgActionPaths - $wgActionPaths['view'] = $wgArticlePath ; -} - if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins"; if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins"; if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; diff --git a/includes/Title.php b/includes/Title.php index 060630c656..39ecc5f7de 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -892,21 +892,29 @@ class Title { $url = str_replace( '$1', $dbkey, $wgArticlePath ); } } else { - $url = false; - global $wgActionPaths; - if( !empty( $wgActionPaths ) ) { - $url = Title::resolveActionPath( $dbkey, $query ); + $url = false; + $matches = array(); + if ( !empty( $wgActionPaths ) && + preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) + { + $action = urldecode( $matches[2] ); + if ( isset( $wgActionPaths[$action] ) ) { + $query = $matches[1]; + if ( isset( $matches[4] ) ) { + $query .= $matches[4]; + } + $url = str_replace( '$1', $dbkey, $wgActionPaths[$action] ); + if ( $query != '' ) { + $url = wfAppendQuery( $url, $query ); + } + } } - if ( $url === false ) { if ( $query == '-' ) { $query = ''; } - #$url = "{$wgScript}?title={$dbkey}&{$query}"; - # forge a nice URL (ex: /wiki/Special:Foo?q=1&r=2 ) - $baseurl = str_replace( '$1', $dbkey, $wgArticlePath ); - $url = wfAppendQuery( $baseurl, $query ); + $url = "{$wgScript}?title={$dbkey}&{$query}"; } } @@ -920,38 +928,6 @@ class Title { return $url; } - /** - * Helper for getLocalUrl() to handles $wgActionPaths - * - * @param $dbkey string Title in database key format - * @param $query string request parameters in CGI format (p=1&q=2&..) - * @return Url resolved or boolean false - */ - private static function resolveActionPath( $dbkey, $query ) { - $url = ''; - - # query parameters are easier to handle using an array: - $queryArray = wfCGIToArray( $query ); - - global $wgActionPaths; - if( !array_key_exists( 'action', $queryArray ) ) { - // Makes the default action 'view' and points to $wgArticlePath - // FIXME: this should be handled in Setup or Wiki! - global $wgArticlePath; - $url = str_replace( '$1', $dbkey, $wgArticlePath ); - } elseif( isset( $wgActionPaths[$queryArray['action']] ) ) { - $url = str_replace( '$1', $dbkey, $wgActionPaths[$queryArray['action']] ); - } else { - # No path found - return false; - } - - # No need to append the action since we have embed it in the path - unset( $queryArray['action'] ); - $url = wfAppendQuery( $url, wfArrayToCGI( $queryArray ) ); - return $url; - } - /** * Get a URL that's the simplest URL that will be valid to link, locally, * to the current Title. It includes the fragment, but does not include diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 012cdfb641..815b54208f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -538,7 +538,7 @@ Definition list with wikilink containing colon !! input ; [[Help:FAQ]]: The least-read page on Wikipedia !! result -
Help:FAQ
The least-read page on Wikipedia +
Help:FAQ
The least-read page on Wikipedia
!! end @@ -971,7 +971,7 @@ External links: wiki links within external link (Bug 3695) !! input [http://example.com [[wikilink]] embedded in ext link] !! result -

wikilink embedded in ext link +

wikilink embedded in ext link

!! end @@ -1138,7 +1138,7 @@ External link containing double-single-quotes with no space separating the url f !! input [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].] !! result -

La muerte de Casagemas (1901) en el sitio de Museo Picasso. +

La muerte de Casagemas (1901) en el sitio de Museo Picasso.

!! end @@ -1147,7 +1147,7 @@ URL-encoding in URL functions (single parameter) !! input {{localurl:Some page|amp=&}} !! result -

/wiki/Some_page?amp=& +

/index.php?title=Some_page&amp=&

!! end @@ -1156,7 +1156,7 @@ URL-encoding in URL functions (multiple parameters) !! input {{localurl:Some page|q=?&=&}} !! result -

/wiki/Some_page?q=?&amp=& +

/index.php?title=Some_page&q=?&amp=&

!! end @@ -1461,7 +1461,7 @@ Broken link !! input [[Zigzagzogzagzig]] !! result -

Zigzagzogzagzig +

Zigzagzogzagzig

!! end @@ -1470,7 +1470,7 @@ Broken link with fragment !! input [[Zigzagzogzagzig#zug]] !! result -

Zigzagzogzagzig#zug +

Zigzagzogzagzig#zug

!! end @@ -1542,7 +1542,7 @@ Link to namespaces !! input [[Talk:Parser testing]], [[Meta:Disclaimers]] !! result -

Talk:Parser testing, Meta:Disclaimers +

Talk:Parser testing, Meta:Disclaimers

!! end @@ -1551,7 +1551,7 @@ Piped link to namespace !! input [[Meta:Disclaimers|The disclaimers]] !! result -

The disclaimers +

The disclaimers

!! end @@ -1569,7 +1569,7 @@ Link containing % (not as a hex sequence) !! input [[7% Solution]] !! result -

7% Solution +

7% Solution

!! end @@ -1578,7 +1578,7 @@ Link containing % as a single hex sequence interpreted to char !! input [[7%25 Solution]] !! result -

7% Solution +

7% Solution

!!end @@ -1615,7 +1615,7 @@ Link containing double-single-quotes '' (bug 4598) !! input [[Lista d''e paise d''o munno]] !! result -

Lista d''e paise d''o munno +

Lista d''e paise d''o munno

!! end @@ -1624,7 +1624,7 @@ Link containing double-single-quotes '' in text (bug 4598 sanity check) !! input Some [[Link|pretty ''italics'' and stuff]]! !! result -

Some pretty italics and stuff! +

Some pretty italics and stuff!

!! end @@ -1633,7 +1633,7 @@ Link containing double-single-quotes '' in text embedded in italics (bug 4598 sa !! input ''Some [[Link|pretty ''italics'' and stuff]]! !! result -

Some pretty italics and stuff! +

Some pretty italics and stuff!

!! end @@ -1648,10 +1648,10 @@ Link with double quotes in title part (literal) and alternate part (interpreted) [[''Pentecoste''|''Pentecoste'']] !! result -

File:Denys Savchenko Pentecoste.jpg -

''Pentecoste'' -

Pentecoste -

Pentecoste +

File:Denys Savchenko Pentecoste.jpg +

''Pentecoste'' +

Pentecoste +

Pentecoste

!! end @@ -1671,7 +1671,7 @@ Plain link to URL # ---- # I'm changing it to match the current output--it arguably makes more # sense in the light of the test above. Old expected result was: -#

Piped link to URL: an example URL +#

Piped link to URL: an example URL #

# But I think this test is bordering on "garbage in, garbage out" anyway. # -- wtm @@ -2378,7 +2378,7 @@ Magic links: internal link to RFC (bug 479) !! input [[RFC 123]] !! result -

RFC 123 +

RFC 123

!! end @@ -2418,7 +2418,7 @@ Nonexistent template !! input {{thistemplatedoesnotexist}} !! result -

Template:Thistemplatedoesnotexist +

Template:Thistemplatedoesnotexist

!! end @@ -2600,7 +2600,7 @@ Template with thumb image (with link in description) {{paramtest| param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}} !! result -This is a test template with parameter +This is a test template with parameter !! end @@ -2892,8 +2892,8 @@ Bug 6563: Edit link generation for section shown by !! input {{includeonly section}} !! result -

[edit] Includeonly section

-

[edit] Section T-1

+

[edit] Includeonly section

+

[edit] Section T-1

!! end @@ -2919,7 +2919,7 @@ Bug 6563: Edit link generation for section suppressed by ==Section 1== !! result -

[edit] Section 1

+

[edit] Section 1

!! end @@ -3541,7 +3541,7 @@ Add test with existing image page !! input [[:Image:test]] !! result -

Image:test +

Image:test

!! end @@ -3550,7 +3550,7 @@ bug 18784 Link to non-existent image page with caption should use caption as li !! input [[:Image:test|caption]] !! result -

caption +

caption

!! end @@ -3698,7 +3698,7 @@ Image caption containing another image !! input [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]] !! result -
This is a caption with another image inside it!
+
This is a caption with another image inside it!
!! end @@ -3785,7 +3785,7 @@ Disabled subpages !! input [[/subpage]] !! result -

/subpage +

/subpage

!! end @@ -3796,7 +3796,7 @@ subpage title=[[Page]] !! input {{/Subpage}} !! result -

Page/Subpage +

Page/Subpage

!! end @@ -3866,13 +3866,13 @@ More ===Smaller headline=== Blah blah !! result -

[edit] Headline 1

+

[edit] Headline 1

Some text

-

[edit] Headline 2

+

[edit] Headline 2

More

-

[edit] Smaller headline

+

[edit] Smaller headline

Blah blah

!! end @@ -3911,14 +3911,14 @@ Some text -

[edit] Headline 1

-

[edit] Subheadline 1

-
[edit] Skipping a level
-
[edit] Skipping a level
-

[edit] Headline 2

+

[edit] Headline 1

+

[edit] Subheadline 1

+
[edit] Skipping a level
+
[edit] Skipping a level
+

[edit] Headline 2

Some text

-

[edit] Another headline

+

[edit] Another headline

!! end @@ -3966,16 +3966,16 @@ Handling of sections up to level 6 and beyond -

[edit] Level 1 Heading

-

[edit] Level 2 Heading

-

[edit] Level 3 Heading

-

[edit] Level 4 Heading

-
[edit] Level 5 Heading
-
[edit] Level 6 Heading
-
[edit] = Level 7 Heading=
-
[edit] == Level 8 Heading==
-
[edit] === Level 9 Heading===
-
[edit] ==== Level 10 Heading====
+

[edit] Level 1 Heading

+

[edit] Level 2 Heading

+

[edit] Level 3 Heading

+

[edit] Level 4 Heading

+
[edit] Level 5 Heading
+
[edit] Level 6 Heading
+
[edit] = Level 7 Heading=
+
[edit] == Level 8 Heading==
+
[edit] === Level 9 Heading===
+
[edit] ==== Level 10 Heading====
!! end @@ -4008,12 +4008,12 @@ TOC regression (bug 9764) -

[edit] title 1

-

[edit] title 1.1

-

[edit] title 1.1.1

-

[edit] title 1.2

-

[edit] title 2

-

[edit] title 2.1

+

[edit] title 1

+

[edit] title 1.1

+

[edit] title 1.1.1

+

[edit] title 1.2

+

[edit] title 2

+

[edit] title 2.1

!! end @@ -4044,12 +4044,12 @@ wgMaxTocLevel=3 -

[edit] title 1

-

[edit] title 1.1

-

[edit] title 1.1.1

-

[edit] title 1.2

-

[edit] title 2

-

[edit] title 2.1

+

[edit] title 1

+

[edit] title 1.1

+

[edit] title 1.1.1

+

[edit] title 1.2

+

[edit] title 2

+

[edit] title 2.1

!! end @@ -4074,11 +4074,11 @@ wgMaxTocLevel=3
  • 2 Section 2
  • -

    [edit] Section 1

    -

    [edit] Section 1.1

    -

    [edit] Section 1.1.1

    -

    [edit] Section 1.1.1.1

    -

    [edit] Section 2

    +

    [edit] Section 1

    +

    [edit] Section 1.1

    +

    [edit] Section 1.1.1

    +

    [edit] Section 1.1.1.1

    +

    [edit] Section 2

    !! end @@ -4089,8 +4089,8 @@ Resolving duplicate section names == Foo bar == == Foo bar == !! result -

    [edit] Foo bar

    -

    [edit] Foo bar

    +

    [edit] Foo bar

    +

    [edit] Foo bar

    !! end @@ -4100,8 +4100,8 @@ Resolving duplicate section names with differing case (bug 10721) == Foo bar == == Foo Bar == !! result -

    [edit] Foo bar

    -

    [edit] Foo Bar

    +

    [edit] Foo bar

    +

    [edit] Foo Bar

    !! end @@ -4120,10 +4120,10 @@ __NOTOC__ {{sections}} ==Section 4== !! result -

    [edit] Section 0

    -

    [edit] Section 1

    -

    [edit] Section 2

    -

    [edit] Section 4

    +

    [edit] Section 0

    +

    [edit] Section 1

    +

    [edit] Section 2

    +

    [edit] Section 4

    !! end @@ -4144,7 +4144,7 @@ Link inside a section heading !! input ==Section with a [[Main Page|link]] in it== !! result -

    [edit] Section with a link in it

    +

    [edit] Section with a link in it

    !! end @@ -4166,9 +4166,9 @@ __TOC__
  • 2 title 2
  • -

    [edit] title 1

    -

    [edit] title 1.1

    -

    [edit] title 2

    +

    [edit] title 1

    +

    [edit] title 1.1

    +

    [edit] title 2

    !! end @@ -4190,10 +4190,10 @@ The line above must have a trailing space! --> But just in case it doesn't... !! result -

    [edit] =

    +

    [edit] =

    The line above must have a trailing space!

    -

    [edit] =

    +

    [edit] =

    But just in case it doesn't...

    !! end @@ -4229,19 +4229,19 @@ section 5
  • 5 text " text
  • -

    [edit] text > text

    +

    [edit] text > text

    section 1

    -

    [edit] text < text

    +

    [edit] text < text

    section 2

    -

    [edit] text & text

    +

    [edit] text & text

    section 3

    -

    [edit] text ' text

    +

    [edit] text ' text

    section 4

    -

    [edit] text " text

    +

    [edit] text " text

    section 5

    !! end @@ -4428,7 +4428,7 @@ Media link to nonexistent file (bug 1702) !! input [[Media:No such.jpg]] !! result -

    Media:No such.jpg +

    Media:No such.jpg

    !! end @@ -4437,7 +4437,7 @@ Image link to nonexistent file (bug 1850 - good) !! input [[Image:No such.jpg]] !! result -

    File:No such.jpg +

    File:No such.jpg

    !! end @@ -4446,7 +4446,7 @@ Image link to nonexistent file (bug 1850 - good) !! input [[:Image:No such.jpg]] !! result -

    Image:No such.jpg +

    Image:No such.jpg

    !! end @@ -5451,7 +5451,7 @@ Fuzz testing: Parser14 == onmouseover= == http://__TOC__ !! result -

    [edit] onmouseover=

    +

    [edit] onmouseover=

    http://

    Contents

    !! end @@ -6921,7 +6921,7 @@ Double RFC with a wiki link !! input RFC [[RFC 1234]] !! result -

    RFC RFC 1234 +

    RFC RFC 1234

    !! end @@ -7055,7 +7055,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../|L2]] !! result -

    L2 +

    L2

    !! end @@ -7067,7 +7067,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../]] !! result -

    Subpage test/L1/L2 +

    Subpage test/L1/L2

    !! end @@ -7082,8 +7082,8 @@ subpage title=[[Subpage test/L1/L2/L3]] [[../../|L1]]l !! result -

    L12 -

    L1l +

    L12 +

    L1l

    !! end @@ -7105,7 +7105,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../////]] !! result -

    /// +

    ///

    !! end @@ -7146,7 +7146,7 @@ RAW magic word !! input {{RAW:QUERTY}} !! result -

    Template:QUERTY +

    Template:QUERTY

    !! end @@ -7183,7 +7183,7 @@ Inclusion of !userCanEdit() content !! input {{MediaWiki:Fake}} !! result -

    [edit] header

    +

    [edit] header

    !! end @@ -7214,12 +7214,12 @@ Out-of-order TOC heading levels
    -

    [edit] 2

    -
    [edit] 6
    -

    [edit] 3

    -

    [edit] 1

    -
    [edit] 5
    -

    [edit] 2

    +

    [edit] 2

    +
    [edit] 6
    +

    [edit] 3

    +

    [edit] 1

    +
    [edit] 5
    +

    [edit] 2

    !! end @@ -7517,7 +7517,7 @@ language=sr variant=sr-ec !! input == -{Naslov}- == !! result -

    [уреди] Naslov

    +

    [уреди] Naslov

    !! end @@ -7760,7 +7760,7 @@ Morwen/13: Unclosed link followed by heading !! result

    [[link

    -

    [edit] heading

    +

    [edit] heading

    !! end @@ -7784,7 +7784,7 @@ HHP2.2: Heuristics for headings in preprocessor parenthetical structures !! result

    {{foo|

    -

    [edit] heading

    +

    [edit] heading

    !! end @@ -8058,7 +8058,7 @@ wgUseDynamicDates=1 !! input [[2009-03-24]] !! result -

    2009-03-24 +

    2009-03-24

    !!end @@ -8087,7 +8087,7 @@ wgUseDynamicDates=false !! input [[2009-03-24]] !! result -

    2009-03-24 +

    2009-03-24

    !! end @@ -8107,7 +8107,7 @@ wgUseDynamicDates=true !! input [[January 15]] !! result -

    January 15 +

    January 15

    !! end @@ -8201,7 +8201,7 @@ title=[[Subpage test]] !! input Poked at a [[/subpage]] here... !! result -Poked at a /subpage here... +Poked at a /subpage here... !!end !! test @@ -8245,7 +8245,7 @@ comment !!input [[ABC%33D% ++]] [[ABC%33D% ++|+%20]] !! result -ABC3D% ++ +%20 +ABC3D% ++ +%20 !! end !! test @@ -8346,7 +8346,7 @@ this is not the the title !! result Screen

    this is not the the title -Template:DISPLAYTITLE:screen +Template:DISPLAYTITLE:screen

    !! end @@ -8442,10 +8442,10 @@ percent-encoding and + signs in internal links (Bug 26410) [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]] [[%33%45]] [[%33%45+]] !! result -

    User:+% Page+title% -%+ %20 %+ %+r -% + bar -3E 3E+ +

    User:+% Page+title% +%+ %20 %+ %+r +% + bar +3E 3E+

    !! end @@ -8455,8 +8455,8 @@ Special characters in embedded file links (bug 27679) [[File:Contains & ampersand.jpg]] [[File:Does not exist.jpg|Title with & ampersand]] !! result -

    File:Contains & ampersand.jpg -Title with & ampersand +

    File:Contains & ampersand.jpg +Title with & ampersand

    !! end diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index 37044bc5a3..70925610bc 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -14,109 +14,4 @@ class TitleTest extends MediaWikiTestCase { } } } - - /** - * Helper to test getLocalURL - * - * @cover Title:getLocalURL - */ - function assertGetLocalURL( $expected, $dbkey, $query, $articlepath, $actionpaths = array(), $variant = false ) - { - global $wgArticlePath; - $wgArticlePath = $articlepath; - global $wgActionPaths; - $wgActionPaths = $actionpaths; - - $t = Title::newFromDBKey( $dbkey ); - - $this->assertEquals( $expected, $t->getLocalURL( $query, $variant ) ); - } - - /** - * @dataProvider provider1 - * @cover Title:getLocalURL - */ - function testGetLocalUrl( $expected, $dbkey, $query ) - { - $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/$1' ); - } - - function provider1() - { - return array( - array( '/wiki/Recentchanges', 'Recentchanges', '' ), - array( '/wiki/Recentchanges?foo=2', 'Recentchanges', 'foo=2' ), - array( '/wiki/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1' ), - ); - } - - - /** - * @dataProvider provider2 - * @cover Title:getLocalURL - */ - function testGetLocalUrlWithArticlePath( $expected, $dbkey, $query, $actions ) - { - $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', $actions ); - } - - function provider2() - { - return array( - array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( ) ), - array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( 'view' => 'OH MEN' ) ), - array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( 'view' => '/wiki/view/$1' ) ), - array( '/wiki/view/Recentchanges?foo=2', 'Recentchanges', 'foo=2', array( 'view' => '/wiki/view/$1' ) ), - array( '/wiki/view/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1', array() ), - ); - } - - - /** - * @dataProvider provider3 - * @cover Title:getLocalURL - */ - function testGetLocalUrlWithActionPaths( $expected, $dbkey, $query ) - { - $actions = array( 'edit' => '/wiki/edit/$1' ); - $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', $actions ); - } - - function provider3() { - return array( - array( '/wiki/view/Recentchanges', 'Recentchanges', ''), - array( '/wiki/edit/Recentchanges', 'Recentchanges', 'action=edit' ), - array( '/wiki/edit/Recentchanges?foo=2', 'Recentchanges', 'action=edit&foo=2' ), - array( '/wiki/edit/Recentchanges?foo=2', 'Recentchanges', 'foo=2&action=edit' ), - array( '/wiki/view/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1' ), - array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1&action=edit' ), - array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&action=edit&bar=1' ), - array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'action=edit&foo=A&bar=1' ), - - # FIXME The next two are equals but need investigation: - array( '/wiki/edit/Recentchanges', 'Recentchanges', 'action=view&action=edit' ), - array( '/wiki/view/Recentchanges?action=edit&action=view', 'Recentchanges', 'action=edit&action=view' ), - ); - } - - /** - * @dataProvider provider4 - * @cover Title:getLocalURL - */ - function testGetLocalUrlWithVariantArticlePaths( $expected, $dbkey, $query ) - { - # FIXME find a language with variants! - $this->markTestIncomplete(); - - $actions = array( 'edit' => '/wiki/edit/$1' ); - $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', array(), '/$2/$1' ); - } - - function provider4() { - return array( - array( '/wiki/view/Recentchanges', 'Recentchanges', '', ), - ); - } - - } -- 2.20.1