* @file
* @ingroup Testing
*/
+use Wikimedia\Rdbms\IDatabase;
use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
'name' => 'nullLockManager',
'class' => 'NullLockManager',
] ];
- $reset = function() {
+ $reset = function () {
LockManagerGroup::destroySingletons();
};
$setup[] = $reset;
MediaWikiServices::getInstance()->disableService( 'MediaHandlerFactory' );
MediaWikiServices::getInstance()->redefineService(
'MediaHandlerFactory',
- function() {
+ function () {
return new MockMediaHandlerFactory();
}
);
* @return ScopedCallback
*/
protected function createTeardownObject( $teardown, $nextTeardown = null ) {
- return new ScopedCallback( function() use ( $teardown, $nextTeardown ) {
+ return new ScopedCallback( function () use ( $teardown, $nextTeardown ) {
// Schedule teardown snippets in reverse order
$teardown = array_reverse( $teardown );
$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' );