3 use MediaWiki\Revision\MutableRevisionRecord
;
4 use MediaWiki\Revision\SlotRecord
;
5 use MediaWiki\Tests\Revision\McrReadNewSchemaOverride
;
8 * Tests Revision against the intermediate MCR DB schema for use during schema migration.
14 * @group ContentHandler
18 class RevisionMcrReadNewDbTest
extends RevisionDbTestBase
{
20 use McrReadNewSchemaOverride
;
22 protected function getContentHandlerUseDB() {
26 public function provideGetTextId() {
29 $slot = new SlotRecord( (object)[
30 'slot_revision_id' => 42,
31 'slot_content_id' => 1,
32 'content_address' => 'tt:789',
33 'model_name' => CONTENT_MODEL_WIKITEXT
,
34 'role_name' => SlotRecord
::MAIN
,
36 ], new WikitextContent( 'Test' ) );
38 $rec = new MutableRevisionRecord( $this->getMockTitle() );
40 $rec->setSlot( $slot );
45 public function provideGetRevisionText() {
46 yield
'no text table' => [
49 yield
'force text table' => [
52 'tables' => [ 'text' ],
53 'fields' => [ 'old_id', 'old_text', 'old_flags', 'rev_text_id' ],
54 'joins' => [ 'text' => [ 'INNER JOIN', 'old_id=rev_text_id' ] ]