C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333996 )

Change subject: Update html/php clauses for subpage parserTests.
......................................................................

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
---
M tests/parser/ParserTestRunner.php
M tests/parser/parserTests.txt
2 files changed, 21 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/333996/1

diff --git a/tests/parser/ParserTestRunner.php 
b/tests/parser/ParserTestRunner.php
index 281e1df..298feae 100644
--- a/tests/parser/ParserTestRunner.php
+++ b/tests/parser/ParserTestRunner.php
@@ -974,7 +974,10 @@
                        '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 3853a12..42a1d1c 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -8134,19 +8134,32 @@
 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 @@
 !! test
 Purely hash wikilink
 !! options
-title=[[User:test/123]]
+title=[[User:Test/123]]
+subpage
 !! wikitext
 [[#a|b]]
 !! html/php

-- 
To view, visit https://gerrit.wikimedia.org/r/333996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e5e3bbd0dea6fc12f3b9ff9feeb58812fc51af1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to