From 69be6f316a290e92dba4e55161fe80a1bd0ca0db Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 23 Feb 2017 16:14:54 -0500 Subject: [PATCH] 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 --- tests/parser/ParserTestRunner.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 7edde2ae4b..35c2480d02 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -974,10 +974,9 @@ class ParserTestRunner { '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 ) ], -- 2.20.1