Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339500 )

Change subject: Make the parser tests' "subpage" option actually enable for all 
subpages
......................................................................

Make the parser tests' "subpage" option actually enable for all subpages

The option says "enable subpages (disabled by default)", but it
currently just enables subpages for namespaces 0 and 2. This tripped me
up when writing some parser tests for TemplateStyles where I need
subpages enabled for namespace 10.

There's probably no reason not to have it enable subpages for all
namespaces.

Change-Id: Icf864dafc4208a76af7b3e71f5f9c97576c065b7
---
M tests/parser/ParserTestRunner.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/339500/1

diff --git a/tests/parser/ParserTestRunner.php 
b/tests/parser/ParserTestRunner.php
index 7edde2a..35c2480 100644
--- a/tests/parser/ParserTestRunner.php
+++ b/tests/parser/ParserTestRunner.php
@@ -974,10 +974,9 @@
                        'wgEnableUploads' => self::getOptionValue( 
'wgEnableUploads', $opts, true ),
                        'wgLanguageCode' => $langCode,
                        'wgRawHtml' => self::getOptionValue( 'wgRawHtml', 
$opts, false ),
-                       'wgNamespacesWithSubpages' => [
-                               0 => isset( $opts['subpage'] ),
-                               2 => isset( $opts['subpage'] ),
-                       ],
+                       'wgNamespacesWithSubpages' => array_fill_keys(
+                               MWNamespace::getValidNamespaces(), isset( 
$opts['subpage'] )
+                       ),
                        'wgMaxTocLevel' => $maxtoclevel,
                        'wgAllowExternalImages' => self::getOptionValue( 
'wgAllowExternalImages', $opts, true ),
                        'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', 
$opts, 180 ) ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf864dafc4208a76af7b3e71f5f9c97576c065b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

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

Reply via email to