MediaWiki REL1_33
RevisionMcrReadNewDbTest.php
Go to the documentation of this file.
1<?php
2
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 public function provideGetRevisionText() {
46 yield 'no text table' => [
47 []
48 ];
49 yield 'force text table' => [
50 [],
51 [
52 'tables' => [ 'text' ],
53 'fields' => [ 'old_id', 'old_text', 'old_flags', 'rev_text_id' ],
54 'joins' => [ 'text' => [ 'JOIN', 'old_id=rev_text_id' ] ]
55 ]
56 ];
57 }
58
59}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
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.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Definition hooks.txt:783
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:244