MediaWiki
REL1_32
RevisionMcrReadNewDbTest.php
Go to the documentation of this file.
1
<?php
2
3
use
MediaWiki\Revision\MutableRevisionRecord
;
4
use
MediaWiki\Revision\SlotRecord
;
5
use MediaWiki\Tests\Revision\McrReadNewSchemaOverride;
6
18
class
RevisionMcrReadNewDbTest
extends
RevisionDbTestBase
{
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
}
MediaWiki\Revision\MutableRevisionRecord
Mutable RevisionRecord implementation, for building new revision entries programmatically.
Definition
MutableRevisionRecord.php:41
MediaWiki\Revision\SlotRecord
Value object representing a content slot associated with a page revision.
Definition
SlotRecord.php:39
RevisionDbTestBase
RevisionDbTestBase contains test cases for the Revision class that have Database interactions.
Definition
RevisionDbTestBase.php:15
RevisionDbTestBase\getMockTitle
getMockTitle()
Definition
RevisionDbTestBase.php:112
RevisionMcrReadNewDbTest
Tests Revision against the intermediate MCR DB schema for use during schema migration.
Definition
RevisionMcrReadNewDbTest.php:18
RevisionMcrReadNewDbTest\getContentHandlerUseDB
getContentHandlerUseDB()
Definition
RevisionMcrReadNewDbTest.php:22
RevisionMcrReadNewDbTest\provideGetTextId
provideGetTextId()
Definition
RevisionMcrReadNewDbTest.php:26
WikitextContent
Content object for wiki text pages.
Definition
WikitextContent.php:35
CONTENT_MODEL_WIKITEXT
const CONTENT_MODEL_WIKITEXT
Definition
Defines.php:235
tests
phpunit
includes
RevisionMcrReadNewDbTest.php
Generated on Mon Nov 25 2024 15:58:52 for MediaWiki by
1.10.0