);
}
+ /**
+ * @return int
+ */
+ abstract protected function getMcrMigrationStage();
+
+ /**
+ * @return string[]
+ */
+ abstract protected function getMcrTablesToReset();
+
protected function setUp() {
global $wgContLang;
+ $this->tablesUsed += $this->getMcrTablesToReset();
+
parent::setUp();
$this->mergeMwGlobalArrayValue(
);
$this->setMwGlobals( 'wgContentHandlerUseDB', $this->getContentHandlerUseDB() );
+ $this->setMwGlobals(
+ 'wgMultiContentRevisionSchemaMigrationStage',
+ $this->getMcrMigrationStage()
+ );
MWNamespace::clearCaches();
// Reset namespace cache
$wgContLang->resetNamespaces();
+ $this->overrideMwServices();
+
if ( !$this->testPage ) {
/**
* We have to create a new page for each subclass as the page creation may result
return $f + [ 'ar_namespace', 'ar_title' ];
},
];
- yield [
- function ( $f ) {
- unset( $f['ar_text'] );
- return $f;
- },
- ];
yield [
function ( $f ) {
unset( $f['ar_text_id'] );
*/
public function testNewKnownCurrent() {
// Setup the services
+ $this->resetGlobalServices();
$cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
$this->setService( 'MainWANObjectCache', $cache );
$db = wfGetDB( DB_MASTER );