RevisionMcrWriteBothDbTest.php 983 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. use MediaWiki\Tests\Storage\McrWriteBothSchemaOverride;
  3. /**
  4. * Tests Revision against the intermediate MCR DB schema for use during schema migration.
  5. *
  6. * @covers Revision
  7. *
  8. * @group Revision
  9. * @group Storage
  10. * @group ContentHandler
  11. * @group Database
  12. * @group medium
  13. */
  14. class RevisionMcrWriteBothDbTest extends RevisionDbTestBase {
  15. use McrWriteBothSchemaOverride;
  16. protected function getContentHandlerUseDB() {
  17. return true;
  18. }
  19. public function provideGetTextId() {
  20. yield [ [], null ];
  21. $row = (object)[
  22. 'rev_id' => 7,
  23. 'rev_page' => 1, // should match actual page id
  24. 'rev_text_id' => 789,
  25. 'rev_timestamp' => '20180101000000',
  26. 'rev_len' => 7,
  27. 'rev_minor_edit' => 0,
  28. 'rev_deleted' => 0,
  29. 'rev_parent_id' => 0,
  30. 'rev_sha1' => 'deadbeef',
  31. 'rev_comment' => 'some comment',
  32. 'rev_comment_text' => 'some comment',
  33. 'rev_comment_data' => '{}',
  34. 'rev_user' => 17,
  35. 'rev_user_text' => 'some user',
  36. ];
  37. yield [ $row, 789 ];
  38. }
  39. }