$this->setMwGlobals( [
'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
- 'wgCommentTableSchemaMigrationStage' => MIGRATION_NEW,
'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
] );
);
}
- /**
- * @covers Revision::fetchRevision
- */
- public function testFetchRevision() {
- // Hidden process cache assertion below
- $this->testPage->getRevision()->getId();
-
- $this->testPage->doEditContent( new WikitextContent( __METHOD__ ), __METHOD__ );
- $id = $this->testPage->getRevision()->getId();
-
- $this->hideDeprecated( 'Revision::fetchRevision' );
- $res = Revision::fetchRevision( $this->testPage->getTitle() );
-
- # note: order is unspecified
- $rows = [];
- while ( ( $row = $res->fetchObject() ) ) {
- $rows[$row->rev_id] = $row;
- }
-
- $this->assertEmpty( $rows, 'expected empty set' );
- }
-
/**
* @covers Revision::getPage
*/
'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() );