// Set up null lock managers
$setup['wgLockManagers'] = [ [
'name' => 'fsLockManager',
- 'class' => 'NullLockManager',
+ 'class' => NullLockManager::class,
], [
'name' => 'nullLockManager',
- 'class' => 'NullLockManager',
+ 'class' => NullLockManager::class,
] ];
$reset = function () {
LockManagerGroup::destroySingletons();
return new RepoGroup(
[
- 'class' => 'MockLocalRepo',
+ 'class' => MockLocalRepo::class,
'name' => 'local',
'url' => 'http://example.com/images',
'hashLevels' => 2,
public function meetsRequirements( $requirements ) {
foreach ( $requirements as $requirement ) {
switch ( $requirement['type'] ) {
- case 'hook':
- $ok = $this->requireHook( $requirement['name'] );
- break;
- case 'functionHook':
- $ok = $this->requireFunctionHook( $requirement['name'] );
- break;
- case 'transparentHook':
- $ok = $this->requireTransparentHook( $requirement['name'] );
- break;
+ case 'hook':
+ $ok = $this->requireHook( $requirement['name'] );
+ break;
+ case 'functionHook':
+ $ok = $this->requireFunctionHook( $requirement['name'] );
+ break;
+ case 'transparentHook':
+ $ok = $this->requireTransparentHook( $requirement['name'] );
+ break;
}
if ( !$ok ) {
return false;
$options = ParserOptions::newFromContext( $context );
$options->setTimestamp( $this->getFakeTimestamp() );
- if ( !isset( $opts['wrap'] ) ) {
- $options->setWrapOutputClass( false );
- }
-
if ( isset( $opts['tidy'] ) ) {
if ( !$this->tidySupport->isEnabled() ) {
$this->recorder->skipped( $test, 'tidy extension is not installed' );
} else {
$output = $parser->parse( $test['input'], $title, $options, true, true, 1337 );
$out = $output->getText( [
- 'allowTOC' => !isset( $opts['notoc'] )
+ 'allowTOC' => !isset( $opts['notoc'] ),
+ 'unwrap' => !isset( $opts['wrap'] ),
] );
if ( isset( $opts['tidy'] ) ) {
$out = preg_replace( '/\s+$/', '', $out );
if ( isset( $output ) && isset( $opts['showflags'] ) ) {
$actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags );
sort( $actualFlags );
- $out .= "\nflags=" . join( ', ', $actualFlags );
+ $out .= "\nflags=" . implode( ', ', $actualFlags );
}
ScopedCallback::consume( $teardownGuard );
* @return array
*/
private function listTables() {
+ global $wgCommentTableSchemaMigrationStage;
+
$tables = [ 'user', 'user_properties', 'user_former_groups', 'page', 'page_restrictions',
'protected_titles', 'revision', 'ip_changes', 'text', 'pagelinks', 'imagelinks',
'categorylinks', 'templatelinks', 'externallinks', 'langlinks', 'iwlinks',
'archive', 'user_groups', 'page_props', 'category'
];
+ if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+ // The new tables for comments are in use
+ $tables[] = 'comment';
+ $tables[] = 'revision_comment_temp';
+ $tables[] = 'image_comment_temp';
+ }
+
if ( in_array( $this->db->getType(), [ 'mysql', 'sqlite', 'oracle' ] ) ) {
array_push( $tables, 'searchindex' );
}