MediaWiki REL1_32
RevisionMcrReadNewDbTest.php
Go to the documentation of this file.
1<?php
2
5use MediaWiki\Tests\Revision\McrReadNewSchemaOverride;
6
19
20 use McrReadNewSchemaOverride;
21
22 protected function getContentHandlerUseDB() {
23 return true;
24 }
25
26 public function provideGetTextId() {
27 yield [ [], null ];
28
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,
35 'slot_origin' => 1,
36 ], new WikitextContent( 'Test' ) );
37
38 $rec = new MutableRevisionRecord( $this->getMockTitle() );
39 $rec->setId( 42 );
40 $rec->setSlot( $slot );
41
42 yield [ $rec, 789 ];
43 }
44
45}
Mutable RevisionRecord implementation, for building new revision entries programmatically.
Value object representing a content slot associated with a page revision.
RevisionDbTestBase contains test cases for the Revision class that have Database interactions.
Tests Revision against the intermediate MCR DB schema for use during schema migration.
Content object for wiki text pages.
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:235