Update html/php clauses for subpage parserTests.
authorC. Scott Ananian <cscott@cscott.net>
Thu, 19 Jan 2017 20:26:29 +0000 (15:26 -0500)
committerC. Scott Ananian <cscott@cscott.net>
Wed, 25 Jan 2017 15:16:06 +0000 (10:16 -0500)
The NS_USER namespace needs to have subpages enabled before these tests
work on the PHP parser.

Change-Id: I8e5e3bbd0dea6fc12f3b9ff9feeb58812fc51af1

tests/parser/ParserTestRunner.php
tests/parser/parserTests.txt

index 281e1df..97e24b6 100644 (file)
@@ -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 ) ],
index ed09203..6e93319 100644 (file)
@@ -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
+<p>123
+</p>
 !! html/parsoid
 <p>123</p>
 !! 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
+<p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
+</p>
 !! html/parsoid
 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
 !! 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