<?php
+
use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\RevisionStore;
$this->setMwGlobals( [
'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
- 'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
] );
- $this->overrideMwServices();
-
if ( !$this->testPage ) {
/**
* We have to create a new page for each subclass as the page creation may result
( $model === null || $model === CONTENT_MODEL_WIKITEXT )
) {
$ns = $this->getDefaultWikitextNS();
- $titleString = MWNamespace::getCanonicalName( $ns ) . ':' . $titleString;
+ $titleString = MediaWikiServices::getInstance()->getNamespaceInfo()->
+ getCanonicalName( $ns ) . ':' . $titleString;
}
$title = Title::newFromText( $titleString );
$rev->getPage(),
$rev->getId()
);
- $cache->delete( $key, WANObjectCache::HOLDOFF_NONE );
+ $cache->delete( $key, WANObjectCache::HOLDOFF_TTL_NONE );
$this->assertFalse( $cache->get( $key ) );
++$now;
public function testUserCanBitfield( $bitField, $field, $userGroups, $title, $expected ) {
$title = Title::newFromText( $title );
- $this->setMwGlobals(
- 'wgGroupPermissions',
+ $this->setGroupPermissions(
[
'sysop' => [
'deletedtext' => true,
* @covers Revision::userCan
*/
public function testUserCan( $bitField, $field, $userGroups, $expected ) {
- $this->setMwGlobals(
- 'wgGroupPermissions',
+ $this->setGroupPermissions(
[
'sysop' => [
'deletedtext' => true,