[
'page',
'revision',
+ 'comment',
'ip_changes',
'text',
'archive',
$this->setMwGlobals( [
'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
- 'wgCommentTableSchemaMigrationStage' => MIGRATION_NEW,
- 'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
+ 'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
] );
$this->overrideMwServices();
'new null revision should have the same SHA1 as the original revision' );
$this->assertTrue( $orig->getRevisionRecord()->hasSameContent( $rev->getRevisionRecord() ),
'new null revision should have the same content as the original revision' );
- $this->assertEquals( __METHOD__, $rev->getContent()->getNativeData() );
+ $this->assertEquals( __METHOD__, $rev->getContent()->getText() );
}
/**
);
$rev = $this->testPage->getRevision();
- $this->assertSame( $expectedText, $rev->getContent()->getNativeData() );
+ $this->assertSame( $expectedText, $rev->getContent()->getText() );
$this->assertSame( $expectedText, $rev->getSerializedData() );
$this->assertSame( $this->testPage->getContentModel(), $rev->getContentModel() );
$this->assertSame( $this->testPage->getContent()->getDefaultFormat(), $rev->getContentFormat() );
$this->setService( 'MainWANObjectCache', $cache );
$db = wfGetDB( DB_MASTER );
+ $now = 1553893742;
+ $cache->setMockTime( $now );
+
// Get a fresh revision to use during testing
$this->testPage->doEditContent( new WikitextContent( __METHOD__ ), __METHOD__ );
$rev = $this->testPage->getRevision();
$cache->delete( $key, WANObjectCache::HOLDOFF_NONE );
$this->assertFalse( $cache->get( $key ) );
+ ++$now;
+
// Get the new revision and make sure it is in the cache and correct
$newRev = Revision::newKnownCurrent( $db, $rev->getPage(), $rev->getId() );
$this->assertRevEquals( $rev, $newRev );
$this->assertSame( $expected, $rev->getTextId() );
}
- public function provideGetRevisionText() {
- yield [
- [ 'text' ]
- ];
- }
+ abstract public function provideGetRevisionText();
/**
* @dataProvider provideGetRevisionText