MediaWiki REL1_33
RevisionMcrWriteBothDbTest.php
Go to the documentation of this file.
1<?php
3
16
17 use McrWriteBothSchemaOverride;
18
19 protected function getContentHandlerUseDB() {
20 return true;
21 }
22
23 public function provideGetTextId() {
24 yield [ [], null ];
25
26 $row = (object)[
27 'rev_id' => 7,
28 'rev_page' => 1, // should match actual page id
29 'rev_text_id' => 789,
30 'rev_timestamp' => '20180101000000',
31 'rev_len' => 7,
32 'rev_minor_edit' => 0,
33 'rev_deleted' => 0,
34 'rev_parent_id' => 0,
35 'rev_sha1' => 'deadbeef',
36 'rev_comment' => 'some comment',
37 'rev_comment_text' => 'some comment',
38 'rev_comment_data' => '{}',
39 'rev_user' => 17,
40 'rev_user_text' => 'some user',
41 ];
42
43 yield [ $row, 789 ];
44 }
45
46}
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
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.
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
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object
Definition globals.txt:62