During development a lot of classes were placed in MediaWiki\Storage\. The precedent set would mean that every class relating to something stored in a database table, plus all related value classes and such, would go into that namespace. Let's put them into MediaWiki\Revision\ instead. Then future classes related to the 'page' table can go into MediaWiki\Page\, future classes related to the 'user' table can go into MediaWiki\User\, and so on. Note I didn't move DerivedPageDataUpdater, PageUpdateException, PageUpdater, or RevisionSlotsUpdate in this patch. If these are kept long-term, they probably belong in MediaWiki\Page\ or MediaWiki\Edit\ instead. Bug: T204158 Change-Id: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
47 lines
926 B
PHP
47 lines
926 B
PHP
<?php
|
|
|
|
use MediaWiki\Tests\Revision\PreMcrSchemaOverride;
|
|
|
|
/**
|
|
* Tests Revision against the pre-MCR DB schema.
|
|
*
|
|
* @covers Revision
|
|
*
|
|
* @group Revision
|
|
* @group Storage
|
|
* @group ContentHandler
|
|
* @group Database
|
|
* @group medium
|
|
*/
|
|
class RevisionPreMcrDbTest extends RevisionDbTestBase {
|
|
|
|
use PreMcrSchemaOverride;
|
|
|
|
protected function getContentHandlerUseDB() {
|
|
return true;
|
|
}
|
|
|
|
public function provideGetTextId() {
|
|
yield [ [], null ];
|
|
|
|
$row = (object)[
|
|
'rev_id' => 7,
|
|
'rev_page' => 1, // should match actual page id
|
|
'rev_text_id' => 789,
|
|
'rev_timestamp' => '20180101000000',
|
|
'rev_len' => 7,
|
|
'rev_minor_edit' => 0,
|
|
'rev_deleted' => 0,
|
|
'rev_parent_id' => 0,
|
|
'rev_sha1' => 'deadbeef',
|
|
'rev_comment' => 'some comment',
|
|
'rev_comment_text' => 'some comment',
|
|
'rev_comment_data' => '{}',
|
|
'rev_user' => 17,
|
|
'rev_user_text' => 'some user',
|
|
];
|
|
|
|
yield [ $row, 789 ];
|
|
}
|
|
|
|
}
|