* @file
* @ingroup Testing
*/
+use Wikimedia\Rdbms\IDatabase;
use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
MediaWikiServices::getInstance()->resetServiceForTesting( 'MediaHandlerFactory' );
};
- // SqlBagOStuff broke when using temporary tables on r40209 (bug 15892).
+ // SqlBagOStuff broke when using temporary tables on r40209 (T17892).
// It seems to have been fixed since (r55079?), but regressed at some point before r85701.
// This works around it for now...
global $wgObjectCaches;
private function appendNamespaceSetup( &$setup, &$teardown ) {
// Add a namespace shadowing a interwiki link, to test
- // proper precedence when resolving links. (bug 51680)
+ // proper precedence when resolving links. (T53680)
$setup['wgExtraNamespaces'] = [
100 => 'MemoryAlpha',
101 => 'MemoryAlpha_talk'
$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 ) ],
if ( $this->useTemporaryTables ) {
if ( $this->db->getType() == 'sqlite' ) {
# Under SQLite the searchindex table is virtual and need
- # to be explicitly destroyed. See bug 29912
+ # to be explicitly destroyed. See T31912
# See also MediaWikiTestCase::destroyDB()
wfDebug( __METHOD__ . " explicitly destroying sqlite virtual table parsertest_searchindex\n" );
$this->db->query( "DROP TABLE `parsertest_searchindex`" );