wiki.techinc.nl/tests/phpunit/includes/RevisionMcrDbTest.php
Max Semenik 48a323f702 tests: Add explicit return type void to setUp() and tearDown()
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
2019-10-30 14:31:22 -07:00

55 lines
1.1 KiB
PHP

<?php
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\SlotRecord;
use MediaWiki\Tests\Revision\McrSchemaOverride;
/**
* Tests Revision against the MCR DB schema after schema migration.
*
* @covers Revision
*
* @group Revision
* @group Storage
* @group ContentHandler
* @group Database
* @group medium
*/
class RevisionMcrDbTest extends RevisionDbTestBase {
use McrSchemaOverride;
public function setUp() : void {
parent::setUp();
}
protected function getContentHandlerUseDB() {
return true;
}
public function provideGetTextId() {
yield [ [], null ];
$slot = new SlotRecord( (object)[
'slot_revision_id' => 42,
'slot_content_id' => 1,
'content_address' => 'tt:789',
'model_name' => CONTENT_MODEL_WIKITEXT,
'role_name' => SlotRecord::MAIN,
'slot_origin' => 1,
], new WikitextContent( 'Test' ) );
$rec = new MutableRevisionRecord( $this->getMockTitle() );
$rec->setId( 42 );
$rec->setSlot( $slot );
yield [ $rec, 789 ];
}
public function provideGetRevisionText() {
yield 'no text table' => [
[]
];
}
}