* @file
* @ingroup Testing
*/
+use Wikimedia\Rdbms\IDatabase;
use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
$user = $context->getUser();
$options = ParserOptions::newFromContext( $context );
+ if ( !isset( $opts['wrap'] ) ) {
+ $options->setWrapOutputClass( false );
+ }
+
if ( isset( $opts['tidy'] ) ) {
if ( !$this->tidySupport->isEnabled() ) {
$this->recorder->skipped( $test, 'tidy extension is not installed' );
'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 ) ],