MediaWiki REL1_32
RevisionMcrDbTest.php
Go to the documentation of this file.
1<?php
2
5use MediaWiki\Tests\Revision\McrSchemaOverride;
6
19
20 use McrSchemaOverride;
21
22 public function setUp() {
23 parent::setUp();
24 }
25
26 protected function getContentHandlerUseDB() {
27 return true;
28 }
29
30 public function provideGetTextId() {
31 yield [ [], null ];
32
33 $slot = new SlotRecord( (object)[
34 'slot_revision_id' => 42,
35 'slot_content_id' => 1,
36 'content_address' => 'tt:789',
37 'model_name' => CONTENT_MODEL_WIKITEXT,
38 'role_name' => SlotRecord::MAIN,
39 'slot_origin' => 1,
40 ], new WikitextContent( 'Test' ) );
41
42 $rec = new MutableRevisionRecord( $this->getMockTitle() );
43 $rec->setId( 42 );
44 $rec->setSlot( $slot );
45
46 yield [ $rec, 789 ];
47 }
48
49}
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 MCR DB schema after schema migration.
Content object for wiki text pages.
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:235