From: C. Scott Ananian Date: Thu, 19 Jan 2017 20:26:29 +0000 (-0500) Subject: Update html/php clauses for subpage parserTests. X-Git-Tag: 1.31.0-rc.0~4230^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=bb3a0c82513d75df3140df95e016dd094f003795;p=lhc%2Fweb%2Fwiklou.git Update html/php clauses for subpage parserTests. The NS_USER namespace needs to have subpages enabled before these tests work on the PHP parser. Change-Id: I8e5e3bbd0dea6fc12f3b9ff9feeb58812fc51af1 --- diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 281e1df98c..97e24b65f9 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -974,7 +974,10 @@ class ParserTestRunner { 'wgEnableUploads' => self::getOptionValue( 'wgEnableUploads', $opts, true ), 'wgLanguageCode' => $langCode, 'wgRawHtml' => self::getOptionValue( 'wgRawHtml', $opts, false ), - 'wgNamespacesWithSubpages' => [ 0 => isset( $opts['subpage'] ) ], + 'wgNamespacesWithSubpages' => [ + 0 => isset( $opts['subpage'] ), + 2 => isset( $opts['subpage'] ), + ], 'wgMaxTocLevel' => $maxtoclevel, 'wgAllowExternalImages' => self::getOptionValue( 'wgAllowExternalImages', $opts, true ), 'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', $opts, 180 ) ], diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ed09203434..6e93319615 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -8134,19 +8134,32 @@ Link with multiple ":" in a subpage-supporting namespace (bug 63636) Handle title parsing for subpages !! options title=[[/123123]] +subpage !! wikitext 123 +!! html/php +

123 +

!! html/parsoid

123

!! end -## FIXME: Add a working php section here +!! article +User:Test/123 +!! text +test 123 +!! endarticle + !! test Link to a subpage from a namespace other than main !! options -title=[[User:test]] +title=[[User:Test]] +subpage !! wikitext [[/123]] +!! html/php +

/123 +

!! html/parsoid

/123

!! end @@ -8168,7 +8181,8 @@ parsoid=wt2html !! test Purely hash wikilink !! options -title=[[User:test/123]] +title=[[User:Test/123]] +subpage !! wikitext [[#a|b]] !! html/php